Created
May 3, 2013 19:30
-
-
Save yourdesigncoza/5513181 to your computer and use it in GitHub Desktop.
Reboot server once a day
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#THX TO @chrishough : http://noconformity.com/blog/2013/04/15/linux-server-automation-scripts/ | |
#start | |
#----------------------------------------------------------------------- | |
#restart server | |
#DateStamp=$(date +"%Y%m%d %k:%M:%S"); | |
#echo $DateStamp >> /var/log/cron.reboot.log; | |
/sbin/shutdown -r now | |
#----------------------------------------------------------------------- | |
#end | |
# Example Schedule | |
# Reboot Server Daily @ 1:00 AM | |
# 00 01 * * * bash /var/[[ yourdir ]]/server-reboot.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment