(This is the third episode in a series of posts to help you discover all the functionality that you might not know exists in your ClearNode, ClearAlpha, ClearZero or ClearRPT. We’re going to publish an episode each Sunday evening – come back and join us each week !)
Timed Events – special cases
Just a quick recap – Timed Events are control actions that your node can take automatically at specific times of the Month, Week, Day or Hour.
Select “Manage Timed Events” on the bottom of the Node Details screen
You can specify things like “Connect to DoDropIn every Tuesday at 7 pm” (for The Absolute Tech Net)
That’s pretty straight forward, in the time picker you are picking a specific day of the week, hour and minute, and of course the node you want to connect to.
Imagine you generally keep your node connected to a particular hub all day every day – with their permission of course. But the hub controllers have to reboot that hub once in a while, or maybe when you’re not in attendance some miscreant uses your node interfere with the hub, and the hub controllers have to disconnect your node to put a stop to it. Now when you come back to your node you see it disconnected – has been for hours – that’s a tad annoying. There is a solution – again get permission before from the hub controllers before you deploy this.
You can have your node re-connect every so many minutes per hour – the miscreants usually lose interest if they’ve been intercepted and disconnected, you can get back to business once they’ve gone elsewhere.
Create a Connect type Timed Event and select “Hourly” for the Repeat type. Now scroll the Minute Picker down to the bottom – note there are several odd looking entries with a star, a slash and a number.
The number represents how many minutes between each connect attempt, starting at the top of the hour. So “*/20” means the connection will be attempted at 0, 20 and 40 minutes past the top of the hour. I’m sure you can figure out the other alternates for yourself. Handy way to refresh that connection if get’s dropped. In this case the longest you’ll be disconnected will be 20 minutes. If it’s already connected, the connect attempt will be ignored.
After a reboot
There may be an action you want performed shortly after the node boots up – every time it boots up. There is a special case for the “Repeat” type. Create a new Timed Event and scroll the “Repeat” all the way to the bottom.
Note that the “Event time” picker has been locked out and now says “After reboot”. You can pick any Event Type for this kind of “After reboot” entry, although some probably won’t be appropriate – Custom Shell Commands are going to be particularly useful for some of you Linux savvy folks.
These “After reboot” events don’t fire immediately after reboot – they are delayed by 30 seconds – that’s so you can be sure the node has completed it’s startup process, so you’re command isn’t calling some service that hasn’t started up yet.
FYI … in ClearNode Timed Events are implemented as “cron jobs” – you can list them at the Linux CLI using the command “crontab -l”. We constructed this “separation of concerns” so that in the future, if we implement ClearNode on a platform other than Linux that doesn’t support “crontab”, we’d have the option to create something that has a familiar look and feel.
And one last time … if you implement automated connections to big hubs – be careful not to cross connect and ALWAYS seek permission before you do so.
73 … Gerry.