Need help in scheduling

Can anyone help with cron expression for the schedule of bot to run at 7pm ist on every quarter start day.

Thanks in advance.

Hi @Nagini_Pragna

0 0 19 1,4,7,10 * ?

  • 0: Seconds (run at 0 seconds past the minute)
  • 0: Minutes (run at 0 minutes past the hour)
  • 19: Hours (run at 7 PM IST)
  • 1,4,7,10: Day of the month (run on the 1st day of January, April, July, and October)
  • *: Month (every month)
  • ?: Day of the week (no specific day of the week)

Hi @Nagini_Pragna,

Try this Expression

0 0 19 1,4,7,10 * ?

Hope it helps.

Hi @Nagini_Pragna

0 30 18 1,4,7,10 * ?

0 0 19 1,4,7,10 * ?

@Nagini_Pragna

0 30 18 1,4,7,10 ? *

Cheers!!

Do you mean you want the automation to run on 1st day of each quarter? In that case this would be suitable:

0 0 19 1 1,4,7,10 ?

Verify the timezone your Orchestrator uses. If it’s not IST, change the “19” accordingly.

You can use this page for help when you need to create cron expressions: Free Online Cron Expression Generator and Describer - FreeFormatter.com - https://www.freeformatter.com/. It’s also handy for describing existing expressions and providing next run dates so you can easily check if the expression is what you want.

Hi @Nagini_Pragna

You can use the below Cron expression to run the bot on first day at 7pm on every January, April, July and October.

0 0 19 1 JAN,APR,JUL,OCT ?
  • 0: The minute when the job will run (0 minutes).
  • 0: The hour when the job will run (midnight).
  • 19: The day of the month when the job will run (1st day).
  • 1: The month field for January.
  • JAN,APR,JUL,OCT: The months when the job will run (January, April, July, October).
  • ?: The day of the week field, which is set to “any day of the week” since the day of the week is not relevant in this case.
  • *: The year field, which means “any year.”

Hope it helps!!

Thanks for reply. if I want to run on 1st working day. What I need to change?

Okay @Nagini_Pragna

You can use the below cron expression.

0 19 1W 1,4,7,10 ?
  • 0: The minute when the job will run (0 minutes).
  • 19: The hour when the job will run (7 PM).
  • 1W: The day of the month field, set to the first working day (weekday) of the month. If the 1st is not a working day, it will move to the next working day.
  • 1,4,7,10: The month field for January, April, July, and October.
  • ?: The day of the week field, which is set to “any day of the week.”

Hope it helps!!

Hi @Nagini_Pragna

0 0 19 1W 1,4,7,10 ? *
  • 0: Seconds (run at 0 seconds past the minute)
  • 0: Minutes (run at 0 minutes past the hour)
  • 19: Hours (run at 7 PM IST)
  • 1W: Day of the month (the first weekday)
  • 1,4,7,10: Month (January, April, July, October)
  • ?: Day of the week (no specific day of the week)
  • *: Any year

Regards

Bank of Cron expressions

@Nagini_Pragna, do take into account this if you use the ‘W’ option:

0 0 0 15W * ? would trigger at midnight of the nearest weekday to the 15th, every month. If the 15th is a Saturday, it would trigger on Friday the 14th, whereas if the 15th is Sunday, it will trigger on Monday the 16th.
(source: Orchestrator - Using Cron Expressions - https://docs.uipath.com/)

This might or might not be according to how you want the schedule to behave.

Also, if you want to take into account public holidays, you will have to do some workaround as it’s not directly supported. Some alternatives that come to mind:
a) Use the Cron expression:
0 0 19 1-7 1,4,7,10 ?
to run the process on every day between 1st and 7th of each quarter. Then in code you can check if the current day is a working day, and if, have the robot do nothing.
b) Schedule time triggers that trigger only on the specific days. As there are 4 days in a year when you want the process to run, you need to configure 4 triggers per year. While not optimal, it’s still manageable.
c) Create a separate automation that creates the triggers for you, for instance for current year. Depending how long the process is going to be used, it might not be worth the extra effort though.