I created a Python script that opens a certain software on my PC (the MetaTrader 5 software to be specific), does some processing, saves a file to disk, and closes the software. To have the script running in the background (in hidden / headless / background mode), I was advised to convert the script to a Windows task, since my initial approach using subprocess.Popen()
and the STARTUPINFO
instance seems to fail for any complex application (see John Hennig's comment under his reply here). Therefore, I created a .bat
file and connected it with my new Windows task. Now I hit a roadblock though, since Windows tasks are typically set up with triggering time/frequency to be run automatically. In my case, however, I want the trigger to be an external Python script. Is this possible? If not, is there any other way to have applications run without their windows flashing up on screen?
Asked
Active
Viewed 85 times
0

lazarea
- 1,129
- 14
- 43
-
This is a prime example of the [XY Problem](https://xyproblem.info). – IInspectable May 19 '21 at 05:49
-
https://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe – viilpe May 20 '21 at 08:02