I use some postprocessing powershell scripts (called by a bat file), and when they are called by SABnzbd in postprocessing they never exit. If I grab the commandline being executed with process explorer, and paste it into cmd, it runs perfectly fine.
The little output log added (thank you devs!) when I kill the script just shows up to the powershell execution and nothing afterward. Even if I modify the powershell script to just run dir, it will still hang. The strange thing is this worked just fine on my Windows 7 computer. Not sure how to debug this. Would appreciate any help.
Version: 0.5.0
OS: Windows Server 2008 R2 Standard
EDIT: This seems to be a common problem with powershell in general when being called by other programs. /EDIT
EDIT2: Screw Powershell I just rewrote everything in C#. /EDIT2
Thanks,
Mills
Powershell not exiting when called by SAB
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Powershell not exiting when called by SAB
Last edited by Mills on March 7th, 2010, 10:14 am, edited 1 time in total.
Re: Powershell not exiting when called by SAB
Yeah, somehow MS had to screw up.
You didn't think they'd make a really usable scripting language, now did you?
You didn't think they'd make a really usable scripting language, now did you?
Re: Powershell not exiting when called by SAB
I'm having a similar problem with Robocopy. The first time this code runs it's fine but it never exits and any item in the queue that follows will not process.
Any thoughts?
Thx,
Mike
Code: Select all
robocopy M:\!Processing\_tv\ M:\!Processing\_tvfinished\ /E /XD _* /MOV /MON:1 /MOT:1
Thx,
Mike
Re: Powershell not exiting when called by SAB
Of course it doesn't exit.
The /MON and /MOT parameters will make it run forever.
You cannot use those in a script.
See:
http://www.stevelu.com/TechnicalArticle ... /1206.aspx
The /MON and /MOT parameters will make it run forever.
You cannot use those in a script.
See:
http://www.stevelu.com/TechnicalArticle ... /1206.aspx