My Windows pc would just shut down even with the script active, but i got no synology. What might could be the issue is that the script adds and deletes a .lock file, so it knows when it is already running. Would that be the cause? Does some one maybe has an idea how to solve that?
Only nzbs paused by the script will be checked, not nzbs you paused after adding. So if you hit the button on a NZB that is paused by the user (and never by the script) it wont be checked.
But if you know when your NAS should be off, maybe modify the scheduler timer line in the script (assuming u use a recent version of NZBGet). Look for this in the beginning of the script:
Code: Select all
##############################################################################
### TASK TIME: *;*:00;*:15;*:30;*:45 ###
##############################################################################
it works just like the NZBGet scheduler. So *; run at start up, *:00 is run every hour at X:00, maybe make it something like:
Code: Select all
*;0:00;0:30;1:00;1:30;2:00;2:30;3:00;3:30
Or test with a big interval, and see if your synology goes to sleep with that? If the big interval does not help, then it won't be the .lock file part, and it must be something within NZBget that prevents the going to sleep.
Something you also could test, is to use it like previous Scheduler scripts, and plan the scheduler part of the script being run by NZBget, and configure that via SCHEDULER in NZBGet Settings. (maybe you need to remove the TASK TIME part in the script to test that).