I have an automation rule to create a ticket on the 10th and 25th of each month. This works without issue.
If the 10th or the 25th of the month falls on a Saturday or Sunday, I need the rule to fire on the preceding Friday and then not fire on the actual date. Is there a way to do this?
Hi Drew!
I assume that you currently using a CRON Expression that looks something like this:
0 0 0 10,25 * ? *
What you could do is copy the automation and split it into two separate, with one triggering on the 10th and another on 25th.
And if you then use a W* after the date, like 0 0 0 10W * ? *, it will trigger at XY am, on the nearest weekday to the 10th of the month, every month
And have the second one set to 0 0 0 25W * ? *
Swap out the time for what you currently have and you will make sure for it to go off at the closest Weekday.
(I know you asked for it to trigger on the Friday before the weekend, but I am not sure that is possible with Cron expressions)
*W (“weekday”) - used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify “10W” as the value for the day-of-month field, the meaning is: “the nearest weekday to the 10th of the month”. So if the 10th is a Saturday, the trigger will fire on Friday the 9th. If the 10th is a Sunday, the trigger will fire on Monday the 11th. If the 10th is a Tuesday, then it will fire on Tuesday the 10th.
Hope this helps somewhat at least :)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.