Running Python files with Windows Task Scheduler, weird problem with PyCharm

Hello!

I'm trying to use Windows Task Scheduler to automatically run a couple of python scripts every N hours.

 I provided a path to python.exe on my PC in Windows Task Scheduler , I also provided the path to that particular .py file i want to run, I create a new task in the scheduler and… for some reason  Pycharm opens up with that script, but it doesn't run, it just opens it and that's it. I don't get what I'm supposed to do to run the script without manually clicking the “run” button on UI. 

I thought that maybe there is a workaround, and i just provide a path to pycharm.exe instead of path to python.exe within Windows Task Scheduler, but result is exactly the same.

…I know there are advanced orchestrating programs out there, like Airflow, but all I have is just a few simple scripts, really don't want to go there.

Any help would be appreciated!

0

Please sign in to leave a comment.