Page 1 of 1
Need Help with Shutdown sabnzbd+ via script
Posted: March 1st, 2010, 4:44 pm
by HuddaDudda
Hello everyone! I recently switched nzb programs from Newsbin Pro to sabnzbd+ and not looking back! I love this program and all the features. Auto move, delete, and rename is perfect. I am having an issue though with the sabnzbd+ shutting down properly after the downloads are complete and everything is done. I have my server wake up at a specific time, then I have task scheduler task to start sabnzbd.exe to start, which it does, it then does its thing but the program wont "stop" to allow the PC to sleep. If I load Sabnzbd manually from the desktop icon and select "shutdown sabnzb" upon complete from the dropdown on queue finish it works fine and the PC will sleep, of course am trying to automate this. Should I be using the sab console instead with the task scheduler? I found on the forums here a script of "shutdown -s -f -c "Download finished" but that shuts the PC down - I just want the sabnzb program or service to shutdown. Should I be using the console version with the task scheduler? Once the sab downloads are complete in the task scheduler I still see "The task is currently running. (0x41301)" - if I manually end it then my PC will sleep so I am certain the PC is not being shutdown because of sabnzb. Also where can I find the commands to find out what -s -f -c do? I found in the wiki the command line parameters but it doesnt make sense to have these for shutdown or am I missing something? I am using 0.5.0 Final. All help is welcome - I searched the forums but I couldnt find any solutions.
Re: Need Help with Shutdown sabnzbd+ via script
Posted: March 1st, 2010, 4:50 pm
by shypike
Use the API calls.
When you shutdown SABnzbd manually, you'll see a long URL in the browser's address bar.
Something like:
http://localhost:8080/sabnzbd/shutdown? ... longstring
Use a tool like GNU
wget or
curl to send this URL to SABnzbd.
Re: Need Help with Shutdown sabnzbd+ via script
Posted: March 1st, 2010, 4:53 pm
by HuddaDudda
Thanks for the reply! Sorry a little green here, can you explain a little more? Is there not a way to make sab default to auto shutdown like the dropdown menu? Maybe someplace in the ini config file or post processing area after its complete? That or a simple script would be great! Is there no way to do that now?
Re: Need Help with Shutdown sabnzbd+ via script
Posted: March 1st, 2010, 6:02 pm
by doubledrat
in other words you always want sab to shutdown when done?
wouldn't it fail to start up in that case? because you'd start it, it would say "I've got nothing to do so I'll shut down"! before you got a chance to add anything to the queue
Re: Need Help with Shutdown sabnzbd+ via script
Posted: March 1st, 2010, 6:08 pm
by HuddaDudda
doubledrat wrote:
in other words you always want sab to shutdown when done?
wouldn't it fail to start up in that case? because you'd start it, it would say "I've got nothing to do so I'll shut down"! before you got a chance to add anything to the queue
Well if you have nzb files already in specific folder, then using task scheduler it would startup the sabnzb, auto load the nzb files, download, process then close - all in the background as a service. Right now it does all of that automatically except shutdown sab which then causes the PC not to sleep as sab is running. FYI - if you startup sab from the desktop icon and then select "shutdown sab" upon completion without anything in the queue it doesnt shutdown automatically. I would think there must be a way to auto close sab via a script or something without needing another application to do it. Possibly a way to select this option in the config, so possibly making it default at program startup this option is preselected.
Re: Need Help with Shutdown sabnzbd+ via script
Posted: March 2nd, 2010, 3:56 am
by shypike
You can set a single-shot end-of-queue action.
Look in the Queue page.
Re: Need Help with Shutdown sabnzbd+ via script
Posted: March 19th, 2010, 9:36 pm
by HuddaDudda
I still cant get Sabnzb to shutdown after the downloads complete. Again Sabnzb is started as a "service" within the task scheduler at a certain time each day. There must be a way to enable it to auto close once the downloads are completed to completly automate things. Without it ending the service when the downloads complete it keeps the PC awake and the PC will not shut down into sleep mode.
Maybe someone can help me with a script that runs after sabnzb is done as a post processing that will then shutdown the sabnzb service?