I've a python flask server file run.py which I want to start as soon as VM reboots. I've tried using the task scheduler on Windows (by basically creating a powershell file which calls run.py and feeding this powershell file to task scheduler) but it never runs on its own. But the strangest thing is, when I right-click on the task and manually start it - then it runs as expected. But when task scheduler does it - it fails.
What can I do to fix this? Any alternatives to task scheduler for running that python server on startup?