Python subprocess.call on sfxcl.exe not working from Windows 2003 Task Scheduler

I wrote a script in Python to invoke the SecureFX command-line tool (sfxcl.exe)

result = subprocess.call([securefx, '/NoPrompt', '/Q', '/RetryCount', retries, '/RetryDelay', '1', '/Log', sfxLogFile, '/List', '/S', session]) 

and then converted it to .exe using py2exe.

I can schedule it locally on my WinXP machine and everything works fine. When I run it manually in Win2003, it also works. BUT, when I plan it using the Windows Task Scheduler in Win2003, it goes through a script and actually does not call sfxcl.exe (no logs at all). I'm pretty dumb why this is ...

Python is not installed in the Win2003 server, but my WinXP (where I developed it).

I am using Python 2.7.1.

EDIT: Or else, if there is no answer to this question - should I start the script run once and set it to restart using the intervals, and what not? Other options? It should start every 15-20 minutes.

+1
source share
1 answer

So, I found the problem, and it is really pretty stupid. If it works manually, you should expect it to work in the Task Scheduler.

Now I forgot to mention that he used a different account in the Scheduler, and this account did not have SecureFX / configuration settings and, therefore, only this part was not executed.

This is not a Python issue.

0
source

All Articles