Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Task Scheduler running Python script: how to prevent taskeng.exe pop-up?

Windows 7 Task Scheduler is running my Python script every 15 minutes. Command line is something like c:\Python\python.exe c:\mypath\myscript.py. It all works well, script is called every 15 minues, etc.

However, the task scheduler pops up a huge console window titled taskeng.exe every time, blocking the view for a few seconds until the script exits.

Is there a way to prevent the pop-up?

like image 595
Danijel Avatar asked Jan 02 '26 03:01

Danijel


1 Answers

Simply save your script with .pyw extension.

As far as I know, .pyw extension is the same as .py, only difference is that .pyw was implemented for GUI programs and therefore console window is not opened.

If there is more to it than this I wouldn't know, perhaps somebody more informed can edit this post or provide their own answer.

like image 69
Doom8890 Avatar answered Jan 03 '26 15:01

Doom8890



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!