We love challenges and invite you to test us. Our timescheduling functionality is extremely powerful due to the possibility of and / or connection, which is why we ask our customers and partners to challenge us from time to time.
John’s Challenge:
“I want a job that usually runs on the 5th of every month to run only if it’s a working day. If the 5th falls on a public holiday or on the weekend, the job should run one day earlier. If this is also a day off, the job should run on the first working day after the 5th of the month.”
And here is the solution:
First of all, we need a definition of the Swiss working days, which on the one hand defines the working days Monday to Friday and at the same time contains a list of all public holidays and excludes them with the status “Inverse”. In the case of list entries without a year, the holiday always falls on the same date, entries with a year are variable holidays that must be maintained annually. We have named this calendar “WORKDAYS_CH”:

Now two intervals are defined. The first interval contains the 4th and 5th of the month if these are working days:

The second interval contains the 5th and a few subsequent days of the month, provided they are working days in Switzerland:

In the next step, an interval JOHN_CHALLENGE_HLP is now defined, which supplies the last working day (if available) for the 4th and 5th and the first working day for the 5th and following
1. Dispatch Interval 5_OR_WORKDAY_BEFORE:

2. Dispatch Interval 5_OR_WORKDAY_AFTER:

Now we pack the above interval into the JOHN_CHALLANGE interval and select the 1st day from these days

Now we have an interval definition that we can use in job schedules. The following screenshot shows the use in a schedule with the executions for the next 400 days.

Do you also have a challenge for us? We look forward to tricky tasks. Feel free to contact us!