crontab -e
crontab -l
env EDITOR=vim crontab -e or crontab -e
The Job will be configured like this:
* * * * * command to execute
│ │ │ │ │
│ │ │ │ └─── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
│ │ │ └──────── month (1 - 12)
│ │ └───────────── day of month (1 - 31)
│ └────────────────── hour (0 - 23)
└─────────────────────── min (0 - 59)
every day at 16:00
0 16 * * * rsync -avzh ~/.cheat/ ~/Dropbox/workplace/cheat/
workday (mo, di. we. th. fr) at 1AM
0 1 * * 1-5 /bin/execute/this/script.sh
every 10 minutes
*/10 * * * * /bin/execute/this/script.sh
every 10 min. Log output to file
*/10 * * * * /bin/execute/this/script.sh >> /var/log/script_output.log 2>&1