Skip to content

Instantly share code, notes, and snippets.

@elliottcordo
Last active May 18, 2016 11:51
Show Gist options
  • Save elliottcordo/4113e1536012a99cbfcfdb1fc4e109ca to your computer and use it in GitHub Desktop.
Save elliottcordo/4113e1536012a99cbfcfdb1fc4e109ca to your computer and use it in GitHub Desktop.
crontab for @reboot actions

Make sure you setup your crontab as su.. crontabs are user specific and you don't want the same jobs scheduled twice!

sudo -s
export VISUAL=nano; crontab -e

Make entries and when done control-x and enter yes for saving changes

0 23   *   *   *    /sbin/shutdown -r +5
@reboot python /usr/local/robopager/robopager/robopager.py
@reboot cd /usr/local/teletraan1&&gunicorn --bind 0.0.0.0:5000 teletraan1:app

You should see the following message: crontab: installing new crontab

Type the following command to double check: crontab -l

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