For more detail information,you can
man crontab
|
Use crontab
To open crontab
crontab -e
|
If you need to run commands with administrative privileges
sudo crontab -e |
Open crontab with your favorite editor.(By default it’s vi or will let you choose one from list)
export EDITOR=gedit crontab -e |
You can append “export EDITOR=gedit” to your ~/.bashrc file if necessary.
To list crontab content
crontab -l
|
To remove all your cron jobs
crontab -r
|
Crontab syntax
* * * * * command to be executed ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───── day of week (0 - 6) (0 is Sunday, or use names) │ │ │ └────────── month (1 - 12) │ │ └─────────────── day of month (1 - 31) │ └──────────────────── hour (0 - 23) └───────────────────────── min (0 - 59)