Cron
This page was last updated on July 18, 2009.
See the Wikipedia Cron page for an indepth explanation of what Cron is and how to use it.
Add a cron job
- Open a terminal window and type:
- Type in the cron job:
- Save the file by pressing the Ctrl and o (that’s the letter – not a zero) keys at the same time.
- Type in either a file name or a path and file name and press the Enter key.
- Exit the nano editor by pressing the Ctrl and x keys at the same time. Crontab will merge your changes into your crontab.
crontab -e
Crontab creates a temporary file and opens the nano editor.
30 14 * * * env DISPLAY=:0.0 /usr/bin/kaffeine
This example will run Kaffeine every day at 2:30 p.m. The env DISPLAY=:0.0 part is only required for GUI applications.
Look at your cron job(s)
- Open a terminal window and type:
crontab -l
Edit your cron job(s)
- Open a terminal window and type:
- Type in the changes you wish to make to the file.
- Save the file by pressing the Ctrl and o keys at the same time.
- Type in either a file name or a path and file name and press the Enter key.
- Exit the nano editor by pressing the Ctrl and x keys at the same time. Crontab will merge your changes into your crontab.
crontab -e
Remove your cron job(s)
- Open a terminal window and type:
crontab -r
Obligatory Happy Ending
And they all lived happily ever after. The end.
