Synology cron job not working

7,969

Solution 1

I've got cronjobs working on our DS1010+. In order to do this I had to add the jobs to /etc/crontab and then run /usr/syno/etc.defaults/rc.d/S04crond.sh stop followed by /usr/syno/etc.defaults/rc.d/S04crond.sh start

Instead of running those last 2 commands you can just reboot the NAS instead. As Khaled says you'll also need to make sure that you have keys set up so that you don't need to enter a password for the SCP.

Solution 2

You need to use "tabs" to separate the entries not spaces.

Share:
7,969

Related videos on Youtube

David
Author by

David

Updated on September 18, 2022

Comments

  • David
    David over 1 year

    I am not sure where to ask this question but I'll ask here first.

    I've got a Synology DS211 server and I am trying to run cron jobs but it is not working.

    This is the code I got in the crontab file

    10 19 4 * * root /opt/bin/openssh-scp user@remote-server:/home/user/Backup/backup.tar.gz /volume1/Backup/ 
    

    However it is not running.

    I am able to run commands with /opt/bin/openssh-scp directly, but not with cron

    Is there anything I am doing wrong?

    • Khaled
      Khaled almost 12 years
      If this command prompts your for a password, it will not work as cron job. Is this the case?
    • David
      David almost 12 years
      It does not require a password, public key installed on remote-server
  • David
    David almost 12 years
    I have already tried restarting the service using synoservice --restart crond and have also tried restarting the NAS. It still does not work.
  • Phil
    Phil almost 12 years
    In that case I'm out of ideas, sorry.
  • slm
    slm over 11 years
    I don't think that that is correct. helpdocs.westserver.net/v3/sitemanager/Using_Cron.htm
  • miracle2k
    miracle2k almost 11 years
    It is correct on Synology.