Sync folders on osx with cron



notes for Sync folders on osx with cron:

use crontab to schedule

crontab -l list jobs crontab -e then add stuff 0 */2 * * * /Users/USERNAME/myScript.sh >>/tmp/auto-update.log 2>&1

test if cron is running on macx

ps ax | grep [c]ron

find error in script

*/2 * * * * /script.sh >>/tmp/auto-update.log 2>&1

example

MM HH DD MM WKD -- Minutes, Hour, Day, Month, Weekday (eg. Sun, Mon) MM HH * * * USERNAME /PATH/TO/SCRIPT 00 3 * * * USERNAME /myscript.sh "Runs at 03:00 every day" 0 */2 * * * run every two hours */2 * * * * every 2 minutes



Tags: ,
Veröffentlicht: 12.2017