Once your script is working as expected, you can keep the notifications enabled. You can just right-click it in the list and invoke it using the Run command.įor troubleshooting, you can enable email notifications on the Task Settings tab to send standard and error output of the script to your email after each run (you need to configure email notifications in the Notification pane of the Control Panel first): To test the task, you don't need modify its schedule. You can then set the values for these variables in the User-defined script field on the Task Settings tab before invoking the bash file: export username=user login data) in the bash file by using environment variables: #!/bin/bash You can avoid putting sensitive information (e.g. You can find the volume information in the tooltip when hovering over the top level folder in the File Station tree view: the absolute path for /homes/admin would be /volume1/homes/admin). You must prepend it with a folder matching the volume it belongs to (e.g. Its address bar doesn't contain the full path. When specifying absolute paths on your device, the information visible in the File Station can be misleading. Don't forget to put the shebang directive in the first line to make it executable: #!/bin/bash This will make it easier to test the script on your own computer first and also to update it later if necessary. Even admin is a much safer choice than root.Īlthough you can put your full script directly inside the User-defined script field on the Task Settings tab, I suggest you create a bash file instead and invoke that from the User-defined script field. To avoid inadvertently harming your device, you should choose a different user which still has the permissions required for the script to work. This gives it full access to the device which you shouldn't need for most tasks. However, there are a few important details to be aware of, especially if you're not a versed Linux user:īy default, a newly created scheduled task will be set to run as a root user. They can easily be created in the Task Scheduler pane of the Control Panel. Running user-defined scripts as scheduled tasks is the best way to backup external data to your Synology NAS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |