Open main menu

CDOT Wiki β

Changes

Crontab tutorial

317 bytes added, 10:44, 11 June 2019
Examples for crobtab entries
<span style="font-family:courier">
'''@reboot''' Run once, at startup.<br>
'''@yearly''' Run once a year (replaces: 0 0 1 1 *)<br>'''@monthly''' Run once a month (replaces: 0 0 1 * *)<br>'''@weekly''' Run once a week (replaces: 0 0 * * 0)<br>'''@daily''' Run once a day (replaces: 0 0 * * *)<br>'''@hourly''' Run once an hour (replaces: 0 * * * *)<br>
</span>
 
==Examples for crontab entries==
 
Here are some examples of crontab entries for automating backup:
 
 
'''@reboot rsync -avz 192.168.10.158:/etc /backup/vm1/''' # Remotely backup changes to /etc/ files in vm1
 
'''0 2 * * * rsync -avz 192.168.10.158:/etc /backup/vm1/''' # Backup at 2:00 am everyday
13,420
edits