I'm running a macro using the Cron trigger and this string
0-59/5 9-16 * * 1-5
which suits my purposes perfectly, and runs the macro between 'business' hours - Monday - Friday.
However, I first tried to do this with a If All Condition Met Execute Actions action, using
Thanks @mrpasini, but I can't see how you're getting weekday out of that? %ICUDateTime%H% gives you the current hour, I get that - I just don't see how you're getting Mon-Fri. Nice method regardless.
It's easy to get this confused (in fact, I did so myself while putting this test together) but it's not the DAY() function you want; rather, it's DOW() (short for "day of week", natch):
(the reason it's returning false is because it's not yet 9AM in my time zone)
The method @mrpasini shows certainly works as well, but I personally would save the steps of making new variables and just use a text condition:
You may also be able to use a periodic trigger, depending on your needs:
Aah yes, periodic trigger is probably what I was looking for at the beginning but was looking at time of day instead. That's a good few ways to do it and useful information all round.
The ICUdatetime token is very useful and versatile. And dow() as well.
Many thanks.