Forum Discussion
Crontab and reboot command?
Hi everybody
I've to make BIG-IP to reboot every month so i want to make schedule from crontab
but i struck with command that to make BIG-IP reboot ? (just "00 00 1 * * reboot" doesn't work)
how to do this job?
thank you for advance
8 Replies
- What_Lies_Bene1
Cirrostratus
OK. You should be using crontab -e while logged in as a user with the necessary privileges when setting up the job. Try 'shutdown -r now' instead of reboot. - kridsana
Cirrocumulus
OK. You should be using crontab -e while logged in as a user with the necessary privileges when setting up the job. Try 'shutdown -r now' instead of reboot.
I try "15 15 * * * shutdown -r now" and nothing happen . so I try to use "20 15 * * * /sbin/shutdown -r now" this is work. (I also try "20 15 * * * /usr/bin/full_box_reboot" but this doesn't work so I think it's problem of shell type or else , have any suggestion?)
Thank you for suggestion. - kridsana
Cirrocumulus
OK. You should be using crontab -e while logged in as a user with the necessary privileges when setting up the job. Try 'shutdown -r now' instead of reboot.
I try "15 15 * * * shutdown -r now" and nothing happen . so I try to use "20 15 * * * /sbin/shutdown -r now" this is work. (I also try "2215 * * * /usr/bin/full_box_reboot" but this doesn't work so I think it's problem of shell type or else , have any suggestion?)
Thank you for suggestion. - kridsana
Cirrocumulus
Another question is how to delete post (that's flushed) T-T
- What_Lies_Bene1
Cirrostratus
/sbin/shutdown -r now should be fine, it's not too surprising a path is required. For a cron reference: http://www.adminschoice.com/crontab-quick-reference (regarding the timing)
No idea how to delete a post I'm afraid. =]
- kridsana
Cirrocumulus
Problem happen again this seem like known issue. (repeatly reboot)
First is I test crontab and seem this work fine , so i used it with another BIG-IP (VM) with NTP set up and result is cron does reboot everytime after boot finished T-T
then I delete NTP from configuration and everything work fine (no repeatly reboot) . ps I used BIG-IP VM ver 11.3.0 provisioned LTM, GTM , AFM , ASM
this doesn't make sense . Problem happen when BIG-IP have NTP configuration -_- ?
can you test this and check result ?
thank you - What_Lies_Bene1
Cirrostratus
See this article for some information on NTP and the host configuration: http://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ve-vmware-esx-esxi-11-3-0/5.html?sr=27098029
Perhaps this is the cause of the issue? - Jnon
Nimbostratus
you should always use a absolute path in the cron for sure,
can you try typing
which full_box_reboot
to get the path of full box reboot.
Curious why your doing a monthly reboot? I've never seen these things have that kind of issue.
Also, are you running in a HA pair, are you interested in doing a config sync before you reboot your primary, unit to make sure the standby has the current config, I also would recommend creating a little shell script that would do a b verify load first - to make sure you have a valid config file before you reboot.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
