Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey folks,
following problem: I have two tasks, one full and one partial Reload. The full reload task should run every last sunday of the month, which works as intended by using the custom syntax option:
"* * ¤ 0 * * * *"
Now, I want to run the partial reload task on any other day except this last sunday of the month. How can I accomplish that, cause the the date of this last sunday varies from month to month - means I can't use a fixed Weekday or something like that.
Any help is useful, thanks in advance!
Hi @alliedarmour,
I would calculate that on the load script. You can add some short of logic to capture the day you are running your application and if is equal the last Sunday of the month you simply Exit Script.
I don't have this logic yet, but this is something I would try.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Can you try setting up 3 different schedules, one for months with 31 days, one for months with 30 days and one for February
For months with 31 days, the last Sunday can be from 25th-31st
For months with 30 days, the last Sunday can be from 24th-30st
- Schedule for Sundas only with the range of days that does not include the last Sunday
For months with 28 days, the last Sunday can be from 22th-28st
For months with 29 days, the last Sunday can be from 23th-29st
For February, you can schedule for the first 3 Sundays.
However, there will be an issue in 2032 as February 1st will fall on a Sunday and there will be 5 Sundays in Feb 2032.
Not an ideal situation but something to consider.
Actually, you could use the "Time Constraint" feature.
Assuming that your full load is scheduled for 10AM on the last Sunday, schedule the Partial Load to run every Sunday at an earlier time of day, say 9:55AM but also add an event trigger for the Full Load with a time constraint of 27 days and 1 hour.
I haven't checked the edge cases- but I think it should work (with a few tweaks if necessary).