Skip to main content

I require setup for two schedules:

  1. For the monthly load, it should execute once a month on the first Sunday.
  2. For the weekly load, it should execute every week, but not on the first Sunday of the month.

Currently, I'm utilizing this CRON job for the monthly load:

0 0 7 ? * 1#1

I need assistance in configuring the CRON job for the weekly load without causing conflicts with the monthly schedule.

Hi Sathish,

 

Please try this link, it has some cool examples I believe you will be able to adapt it to your needs:

https://www.freeformatter.com/cron-expression-generator-quartz.html#cronexpressionexamples

 

Regards

Justice Shivambu


Hi Sathish,

 

  1. 0 0 12 ? 1/1 SUN#1 * -> Time can be changed in this example it would be 12:00
  2. I think here it will be necessary to use 3 schedules as I am not aware of any CRON string to define to just use 2,3 and 4th Sunday of a month and exclude the first one.

So you might need to setup 3 schedules like this:

 

2nd Sunday: 0 0 12 ? 1/1 SUN#2 *

3rd Sunday: 0 0 12 ? 1/1 SUN#3 *

4th Sunday: 0 0 12 ? 1/1 SUN#4 *

 

PS: I am more a fan of http://www.cronmaker.com/

 

BR

Dennis

 


Reply