简体   繁体   中英

Windows Task Scheduler with python -m switch

I have a script I am attempting to run via windows task scheduler. I am able to successfully run this in the cmd prompt:

>  E:\code\python\Flex-LM-Tool\venv\Scripts\python.exe -m flexlmtool

However, when I attempt to set this up in windows task scheduler, I get (0x1) result. I have previously run python scripts in task scheduler without an issue, this time however I am passing in 2 arguments. Here is my Actions:

Windows Task Scheduler操作

Since I was running the "-m" switch, I had to set the "start in" option to my module path. Once I did that, everything worked normally.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM