I want to check a filter and send an alert every 30 minutes but only during business hours. The issue is we are running on Pacific Time so my CRON expression looks like this:
0 0/30 0-1,14-23 ? * MON-FRI
This works well Tuesday to Thursday, but it also send alerts on Sunday afternoon and stops alerts 2 hours early on Friday.
I really don't want to create 2 automations just to get 2 CRON statements.
Unfortunately, I think the situation is still as @Jack Brickey wrote in Nov 2020:
Automation runs at UTC. I wish you could choose your Zone but not there today.
I wonder if maybe you could use the {{now}} Smart Value and combine it with the convertToTimeZone function to write your own Advanced compare condition. I'll think on this a bit.
Or maybe something with the toBusinessDay, toBusinessDayBackwards, or plus or diff using BusinessDays (business days are considered to be Monday to Friday, 9am to 6pm)
Sorry, date calculations usually make my head hurt. But maybe you or others could figure out something clever with those?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After considering what it would take to implement those smart values, I just went with creating 2 automations. :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LOL. Yeah, sometimes the less elegant way is probably simpler. :-}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.