Skip to content

Instantly share code, notes, and snippets.

@yourdesigncoza
Created May 3, 2013 19:30
Show Gist options
  • Save yourdesigncoza/5513181 to your computer and use it in GitHub Desktop.
Save yourdesigncoza/5513181 to your computer and use it in GitHub Desktop.
Reboot server once a day
#!/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