0
votes

How to write cron expressions for below?

  1. first working day of each month at 00:00:00
  2. 4th working day of each month at 06:00:00
  3. 00:00:00 on saturday

Based on above cron expression, how to get start date and end date?

  1. first day of prior month and first day of present month
  2. 1st of previous month and 3 rd working day of present month
  3. Date of monday on present week and date of staturday of present week.
1

1 Answers

2
votes

Tested with Quartz scheduler:

first working day of each month at 00:00:00

 0 0 0 1W * ? *

4th working day of each month at 06:00:00

0 0 6 4W * ? *

00:00:00 on saturday

0 0 0 ? * SAT *