Can I use Cron Expressions to define Non-working time periods for weekly scheduled maintenance?

Is there a way to set non-working time periods vs 24hr non-working days of 12am to 12am? There is a weekly scheduled period of time that is allotted for updates and maintenance. Saturday at 8pm to Sunday 8am. If I were to use the standard non-working days option I would have to disable the bots for both Saturday and Sunday. That would be a significant amount of time that could hinder the bots productivity if it looses 48 hours worth of work. Also another layer of complexity, the bots that I’m needing to set this up on work off of queue triggers. I’m not sure how I would set up a time restrictions if they are triggered when a new transaction is added to the queue?
Thanks for any and all suggestions

Hi @James_Taylor,
Not sure if I understand you correctly but in Orchestrator you can set triggers using Cron expression using advanced option. And just below you may set non-working days.

Hey @Pablito I appreciate your recommendation. Unfortunately the Cron option for triggers is only available on Time Triggers. I have the bots set up on Queue Triggers and the only option for non-working days is whole 24 hour days (12am to 12am). I was thinking too linear and wanting to use Queue Triggers for everyday of the week or nothing. The conclusion that I came to that is going to resolve my issue is to use Queue Triggers M-Sat. Then in the code I have the bot check to see what what time it is and day of the week. This check is done at every iteration of Get Transaction Data. If the bot finds that it is Saturday and it’s at or beyond the scheduled downtime it will pass a value that there is no more transaction data to process. Since this check happens at the Get Transaction Data level, even if the bot is started again by accident after the cut off time it will check day of week and time to make sure it’s allowed to run at that time or not. As for Sunday I have a Time Trigger that starts at the end of the down time window.
Seems to be working this way.
It would be much easier if the non-working days for Queue Triggers had an “Advanced” option to use Cron Expressions. Maybe even have all the same options that are applicable as the Time Trigger for the Queue Trigger.

Thanks

1 Like