Site Tools


This is an old revision of the document!


crontab

IO redirect

redirect all error output to a file, &» /tmp/whatever.log isn't support by sh, so use command below instead:

12  *  *  *  * /opt/homebrew/bin/brew update >> /tmp/brew.log 2>&1
30  */3  *  *  * /opt/homebrew/bin/rsync -av -O --delete /Users/dcai/Dropbox /backups/machinefolder/ >> /tmp/backup.log 2>&1

Adding -O / –omit-dir-times to avoid setting times on directories (which causes errors in ntfs)

devops/crontab.1648717946.txt.gz · Last modified: by dcai