Skip to content

Instantly share code, notes, and snippets.

@quonic
Created March 3, 2019 07:06
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 quonic/d0292161c6f8b6271da20c960f4160fb to your computer and use it in GitHub Desktop.
Save quonic/d0292161c6f8b6271da20c960f4160fb to your computer and use it in GitHub Desktop.
This add an auto upgrade to cron for debian/ubuntu
crontab -l > mycron
echo "0 2 * * * apt-get update" >> mycron
echo "0 3 * * * apt-get -y dist-upgrade" >> mycron
echo "0 4 * * * apt-get -y upgrade" >> mycron
crontab mycron
rm mycron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment