Aus
crontab:
# run five minutes after midnight, every day
5 0 * * * $HOME/bin/daily.job >> $HOME/tmp/out 2>&1
# run at 2:15pm on the first of every month -- output mailed to paul
15 14 1 * * $HOME/bin/monthly
# run at 10 pm on weekdays, annoy Joe
0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?%
23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
5 4 * * sun echo "run at 5 after 4 every sunday"
###
Mit sudo erstellst Du eine Systemcrontab /etc/crontab (die wird noch nicht vorhanden sein)
mit folgendem Inhalt:
Code:
SHELL=/bin/sh
0 0 * * * root /usr/local/bin/mybackup
Das läuft dann jede Nacht um 0:00 Uhr als root.
(weil ich davon ausgehe, dass Du auch andere User oder komplett sichern musst)
(weil es auch ohne angemeldetem User läuft)
(/usr/local/bin/mybackup ist Dein rsyncshellscript)
(Achtung: Usercrontabs werden mit dem Befehl "crontab -e" angelegt!)
Hier ist cron für OSX auch schön auf Deutsch erklärt.
Und launchd gäbe es auch noch.