how to call / run multiple python scripts from batch file in window xp / 7

前端 未结 1 1934
执念已碎
执念已碎 2020-12-08 05:53

I\'m trying to schedule run multiple pythons using batch file.

For example there are my python files that I want to schedule run them on the daily basis



        
相关标签:
1条回答
  • 2020-12-08 06:53

    Method 1: Bat file.

    If you have python in the PATH Environment variable:

    start python D:\py\s1.py
    start python D:\py\s2.py
    

    Else literal path

    start C:\python27\python.exe D:\py\s1.py
    start C:\python27\python.exe D:\py\s2.py
    

    Note that this will not wait for a return from either execution. Note, do not forget to add quotations around the path strings if they contain spaces or special characters.

    See start /? for more help and options.

    Method 2: Two different Scheduled Tasks

    Create two separate scheduled tasks that start at the same time each calling python to run one of the scripts.

    0 讨论(0)
提交回复
热议问题