Forum Discussion
Boris_Rousseau_
Nimbostratus
Jul 01, 2010How to schedule a "Forced Offline" on node with condition
Hello,
I need to do as following:
Automaticly "Force Offline" a Node, at 1Am, IF there is no user connexion.
IF there is user connexion ( on that node), then wait 5 min and try again.
IF there is still user connexion at 1:30am, force offline anyway.
Any idea ?
Best regards
3 Replies
- Hamish
Cirrocumulus
I'd do this in iControl (And perl) myself. You could do this in an iRule as well, but it's best to keep those simple and stable, because they run inline, and any problems means dropped connections.
Others will undoubtedly say tmsh, or something, but there's at least half a dozen choices... PIck the one you feel most comfortable with putting in place and supporting.
The codeshare has several perl examples for dealing with poolmembers. Grab one & just modify it for your requirements. Kick off with cron at 01:00 and put the check, sleep, loop and force offline in the script.
H - George_Watkins_Historic F5 AccountHi Boris,
I agree with Hamish that iControl is the way to go on this. I wish we would just include atd with default installs of BIG-IP. There are number of times it would have been useful to me. That being said, if you are calling the script remotely I would use at to execute the command that way it only executes once. If you put it in cron and forget about it, it could come back to bite you later on. The command sequence would probably look something like this:% export TZ=UTC (or whatever applicable timezone it should be executed in, this has bitten me by not setting the correct timezone) % at 01:00 July 2 at> /usr/local/bin/.pl at> job 5 at Fri Jul 2 01:00:00 2010
If you need to look at scheduled jobs, run 'atq'. If you want to cancel the job, run 'atrm '.
Hope this helps,
George - Boris_Rousseau_
Nimbostratus
THank you George & Hamish
Best regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects