Home > Software engineering >  How to schedule the data pipeline to run on first Tuesday each month and then 5 days later during ni
How to schedule the data pipeline to run on first Tuesday each month and then 5 days later during ni

Time:10-21

I wanted to create a cron job that runs on first Tuesday every month and then 5 days later of first Tuesday at Night time cet.

CodePudding user response:

Tuesday is day_of_the_week 2, and the first week is days 1-7 of the month. Then 5 days later is a Sunday, normally day 0 (but sometimes day 7). This will run the task at 20:00 on the local system time on those days.

0 20 1-7  * 2 run_some_job
0 20 6-12 * 0 run_some_job

CodePudding user response:

// Using the cron configs provided by @bn_ln below.

Within Foundry specifically, you'd configure this in the Schedule editor with an OR operator combining two Advanced time-based triggers like this.

enter image description here

  • Related