With this release comes a new and powerful scheduling feature, a new Trigger Event called Periodic.
Release Notes:
Added Periodic Trigger Event
Added option to disable logging from a Rule
Bug fixes for ZWN-SC7 button controller
Periodic
The Periodic feature brings the power of CRON scheduling to Rule Machine. There are many different kinds of periodic schedules you can create:
Minutes
Every N minutes
Each selected minute
Hourly
Every N hours, starting at a selected time
Each selected hour, at a selected minute after the hour
Daily
Every N days
Every weekday
Each selected day of the month
– At a selected time
Weekly
Each selected day of the week
– At a selected time
Monthly
On a selected day of every N months
On a selected day of selected months
On a selected day of the week in a selected week of the month of every N months
– At a selected time
SmartThings has recently rolled out their new scheduling system. It’s seems appropriate to commemorate that with something that uses it extensively.
For this update you should update both Rule Machine and Rule:
The documentation for scheduling recurring events says not to use chained runIn()s, but to use cron scheduling instead. When you create a loop using a virtual switch or private Boolean, you’re using chained runIn()s. By using Periodic, you’ll be using cron scheduling.
The shortest time period is one minute.
2 Likes
bamarayne
(Jason "The Enabler" as deemed so by @Smart)
6
If I understand the release notes on the new scheduler, using a chained RunIn() will be automatically rescheduled.
I like this update as we can now schedule things more reliably. It definitely opens up RM to a new level of power.
The first thing I see changing is how I’ve programmed my thermostats. I can work in more seasonal changes to them instead of going day by day.
I think we need to start paying @slagle to make sure your garage door opens ‘accidentally’ because every time something pisses you off, the Rule becomes more powerful! Nice job! Thank you…
Actually, Mr. Slagle spent hours holding my hand this morning while I chased down what turned out to be my own bug. I feel really bad about wasting his time. I found it eventually, and all is good. Thanks Tim!! @slagle
You can actually use this to create a Trigger that will remind you of your Mom’s birthday every year with a SMS message. You can also do the things people wanted like enabling their holiday lighting rules automatically, and then disabling them automatically, on a schedule you set up.
Wow amazing! Now I can make my own color loop for my Osram lights that don’t support it yet! I have a rule set to run every minute and set them to a random color and it works pretty well so far would be nice to make it more frequent but it works for now! Thanks!!!
Thanks, so it WAS you who suggested it! I was going to go search to find that post.
It was a fair amount of work. Frankly, I came to it backasswards, as usual. I was messing around with cron, which I never use, and saw these cool sites that show how cron can do cool things, like CronMaker. ST uses CronMaker to test all of their cron schedules for validity, or even to create them in the first place. I used it extensively to test as I worked on it, and to see how it’s supposed to work.
At some point along the way, the light bulb went on, that this was Periodic, and cron is the ugly Unix command that needs a UI to present the power to the user. RM brings more than CronMaker will create, with the Select Minute, Hour, Day, Month stuff, thanks to another website that showed how that stuff works.
Very nice! Thank you, this will be a distracting release because I’ll be thinking of where I can use this instead of listening/interacting with people.
Hey Bruce, I use Sonos reminders extensively, but one thing I was never able to do, is setting a reminder for every other week on Thursday. Is there a way to do it using the periodic? Maybe a future enhancement of every n weeks?!
Cron doesn’t support that. There are actually many things you can’t do with cron directly, such as every 90 minutes. For some of these it just takes two triggers, e.g., one for 1st week of every month, and another for third week.
But, you can only have one Periodic per Trigger. The second trigger could just run the first one’s actions, and you’d be all set.