Problems running python script by windows task scheduler that does pscp

后端 未结 6 1907
轮回少年
轮回少年 2020-12-08 23:16

Not sure if anyone has run into this, but I\'ll take suggestions for troubleshooting and/or alternative methods.

I have a Windows 2008 server on which I am running s

6条回答
  •  孤城傲影
    2020-12-08 23:58

    I had the same issue when trying to open an MS Access database on a Linux VM. Running the script at the Windows 7 command prompt worked but running it in Task Scheduler didn't. With Task Scheduler it would find the database and verify it existed but wouldn't return the tables within it.

    The solution was to have Task Scheduler run cmd as the Program/Script with the arguments /c python C:\path\to\script.py (under Add arguments (optional)).

    I can't tell you why this works but it solved my problem.

提交回复
热议问题