Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
vi /etc/crontab
0 5 * * * 0TAB5TAB*TAB*TAB*TABrootTABsu - remotebackup /path/to/script.sh #The scriptcronjob must be run by the remotebackuproot user because of permissionsor the cronjob will not work and you must use TABS instead of spaces.

When adding or removing commands to the crontab make sure to restart the crond service so the commands take effect.

Code Block
languagebash
synoservice --restart crond/usr/syno/etc/rc.d/S04crond.sh stop
/usr/syno/etc/rc.d/S04crond.sh start

To view the logs to see if your cronjob was run is located in /var/log/messages

...