0 0 22 ? * 4#5 * :-which means–At 10:00 PM, on the fifth Tuesday of the month
however some month does not have tue on last week and in such cases it would fail , I want to make sure that we should run it on last week on tuesday or friday .
Only week it should consider is a week which has 7 days.
This logic i am not able to crack.
Please help me if anyone has any solution in this scenario.
As per my understanding, CRON don’t validate the logics like If Else.
In your case you will have to create two Triggers and monitor them on monthly basis for which one to enable.
You can also Enable both the triggers but you will have to add a logic to check if the bot already ran for the month or not. If not then Run else skip.