Scheduling a Python script to launch via shell (Linux for Windows10), using Windows task scheduler

0

I am trying to use Windows Task Scheduler to launch a Python script via shell, using the new Windows Subsystem for Linux on Windows 10.

This is usually straigthforward for launching bash scripts by starting bash.exe, and then passing in arguments similar to: -c 'cd /mnt/d/some_path && ./some_code.sh'

However, when I try to launch a Python code in a similar fashion nothing seems to be working. I've been using something similar: -c 'cd /mnt/d/some_path && python ./some_code.py'

Wonder if somebody would have an idea as to how to make this work?

Martin R.

Posted 2019-04-17T00:18:42.520

Reputation: 1

Try redirecting output  from the python command. – Scott – 2019-04-17T00:30:46.150

@MartinR. When you run Bash from Windows command prompt, does it recognize it as if that executable is in the PATH environmental variable, or not? – Pimp Juice IT – 2019-04-17T02:36:31.420

Yes it does recognize it – Martin R. – 2019-04-24T14:28:00.380

No answers