简体   繁体   中英

python script via windows 7 scheduler still running

I'm a noobie to python and have over the past few days tested and created a .PY file that runs perfectly from the command prompt either with the D:\\Python34 or just as Its pretty basic. Gets info from web and places it in a spreadsheet - I import requests, BeautifulSoup and openpyxl. The last statement is to save the workbook. I'm figuring that Python closes itself as does the workbook.

I wish to run it daily. So I used the Windows Task Scheduler on my Windows 7 Ultimate. I have it running only when I am logged in. I have tried the following: 1) using python directly with complete paths 2) using only the full path and the 3) using a batch file that does #1 above and has an EXIT 4) using a batch file that does #2 above and has an EXIT

When running the batch from the command file OR Task Scheduler, the command window opens, it does its thing and the command window closes.

The problem is when I run it via the Task Scheduler in any of the above ways, it does its thing, but continues to say "RUNNING" in the scheduler.

I have tried to run the Windows Process Monitor using some filters I found on the web, however nothing shows up.

Extremely frustrating --Any suggestions would be appreciated. Jerry

While I had the Task Scheduler open, the screen was showing "running". After I closed the screen and let it run the next day, everything worked fine. It must be something to do with the refresh on the task scheduler.

So my solution was to close the Task Scheduler and let it run as scheduled.

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