Is your feature request related to a problem? Please describe.
Want to enable/disable and run tasks via script.
Due to poorly conceived IPv6 support in DSM 7.x I want to run a script every minute after reboot, but only up to 15 minutes.
So a reboot script will enable that task (planned minutely) and schedule another task in 15 mins to disable it again.
Describe the solution you'd like
Using the API for Task Scheduler
Describe alternatives you've considered
Schedules running every 5 mins to check for executing specific scripts, but this will not let NAS go into a deeper sleep mode. Wasting energy.
Additional context
Did not find much about the TaskScheduler API, but there is some information to get a hold on it.
I assume you are more experienced to find out API parameters than I.
- Task Scheduler
- Task information via command
- /usr/syno/bin/synoschedtask
- Possible APIs
- SYNO.Core.TaskScheduler & SYNO.Core.TaskScheduler.Root
- Description:
/usr/bin/jq . /usr/syno/synoman/webapi/SYNO.Core.TaskScheduler.lib (JSON with methods, unfortunately without parameters)
- used in (via
grep -Rl -i -e 'SYNO.Core.TaskScheduler' /usr/syno):
- /usr/syno/synoman/webman/modules/AdminCenter/admin_center.js
- /usr/syno/synoman/webman/modules/TaskSchedulerWidget/TaskSchedulerWidget.js
- /usr/syno/synoman/webman/modules/TaskSchedulerUtils/TaskSchedulerUtils.js
- Other information (exposing some parameters):
- Script recommendations: https://kb.synology.com/en-us/DSM/tutorial/common_mistake_in_task_scheduler_script
P.S.:
Already used APIs locally via script to import renewed certficates, that were done on another machine. See https://github.com/maddes-b/synology-nas-tools
Is your feature request related to a problem? Please describe.
Want to enable/disable and run tasks via script.
Due to poorly conceived IPv6 support in DSM 7.x I want to run a script every minute after reboot, but only up to 15 minutes.
So a reboot script will enable that task (planned minutely) and schedule another task in 15 mins to disable it again.
Describe the solution you'd like
Using the API for Task Scheduler
Describe alternatives you've considered
Schedules running every 5 mins to check for executing specific scripts, but this will not let NAS go into a deeper sleep mode. Wasting energy.
Additional context
Did not find much about the TaskScheduler API, but there is some information to get a hold on it.
I assume you are more experienced to find out API parameters than I.
/usr/bin/jq . /usr/syno/synoman/webapi/SYNO.Core.TaskScheduler.lib(JSON with methods, unfortunately without parameters)grep -Rl -i -e 'SYNO.Core.TaskScheduler' /usr/syno):P.S.:
Already used APIs locally via script to import renewed certficates, that were done on another machine. See https://github.com/maddes-b/synology-nas-tools