Skip to content

Instantly share code, notes, and snippets.

@jcaristy
Last active October 2, 2017 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcaristy/8076807644fced77da156b44e4408573 to your computer and use it in GitHub Desktop.
Save jcaristy/8076807644fced77da156b44e4408573 to your computer and use it in GitHub Desktop.
[Ubuntu: Crontab Reboot] #linux #ubuntu

Editamos el crontab

sudo crontab -e

Agregamos la siguiente linea

0 6 * * * /sbin/shutdown -r now

// Reiniciamos todos los dias a las 4am. Hora del servidor

Obtenemos la hora del servidor

date

Validamos cuando fue la ultima vez que reinicio

last reboot | head -1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment