11

Configuring Cron Jobs on a Synology NAS

 3 years ago
source link: https://knasmueller.net/configuring-cron-jobs-on-a-synology-nas
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
NAS

Configuring Cron Jobs on a Synology NAS

Synology-NAS-1600x1067.jpg
Share on

Running regular background tasks on a network-attached storage (NAS) is an essential use case for backups, monitoring and more. With Synology DiskStations, there is an easy GUI-based approach to configure such tasks which still allows you to execute custom scripts.

First, navigate to Control PanelTask Scheduler:

Pasted-into-Configuring-Cron-Jobs-on-a-Synology-NAS.png

Select Create > Scheduled Task > User-defined Script:

Pasted-into-Configuring-Cron-Jobs-on-a-Synology-NAS-1.png

Under “General Settings”, pick a proper name and select the job’s owner (this specifies the Linux system user which will execute the job):

Pasted-into-Configuring-Cron-Jobs-on-a-Synology-NAS-2.png

Next, pick a schedule:

Pasted-into-Configuring-Cron-Jobs-on-a-Synology-NAS-3.png

Finally, you need to specify the path to your user-defined script. You can either create it in the file manager or (the way I prefer), you can SSH into your DiskStation and edit the script directly. Make sure the job’s owner has the necessary permissions to access your script!

You can also provide an email address where the script’s output is sent to which is an excellent way to debug the script on first setup:

Pasted-into-Configuring-Cron-Jobs-on-a-Synology-NAS-4.png

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK