Do CRON expressions take non-working days into account?

Hello!

I’m trying to set up a trigger for my automation to run on every 8th working day. I have created & uploaded a non-working day calendar for all weekends & holidays into the cloud and I have created the CRON expression “0 0 12 1/8 * ?” which defines it to run every 8 days starting after the 1st of the month.

My issue is I don’t know if the CRON expression will count non-working days as one of the “days” in the countdown to the 8th day.

As an example lets say the first of a new month starts on Saturday. That would mean I don’t want the 1st, 2nd, 8th, and 9th days of the month (weekends) to be counted by the CRON expression. In this scenario my desired day to run would be the 12th, but I’m afraid that the CRON expression would cause it to occur on the 8th.

In addition to my first question I wonder if the CRON expression would count any holidays that I have already designated as Non-Working days in its countdown.

Apologies if this has already been answered and please feel free to provide any kind of solution! Even if it is a workaround that could be implemented into the project itself!

Thanks!

No they do not. Non-working days are not considered by CRON. It can’t know what your working days are.

It sounds like you will need a spreadsheet listing non-working (or working) days and then manually calculate the dates you need.

Cron will define when the launch is to execute.

The application of a non-functioning calendar regulates when the calculated launch defined by a configured trigger is not executed

There is no recalculation or computed postponing done

In Addition to above we also suggest:

  • play a little bit the cron freeformatter tool and get some more feeling on
    • what can be defined with a cron
    • what is not in the concept of a cron

Having a preview on strategies on how we can handle your above mentioned schedule plan:

  • Bot/Process is deciding if running or stop-waiting
  • automated Scheduler update by using ORC REST API
  • Starter Queue Item

just to mention a few.

The ratings of the approach ranges from Bot allocation, unneeded idle time, skillset fitting etc

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.