Running multiple Python scripts

后端 未结 3 917
梦毁少年i
梦毁少年i 2021-01-22 17:20

I would like to create a simple Python program that will concurrently execute 2 independent scripts. For now, the two scripts just print a sequence of numbers but my intention i

3条回答
  •  孤独总比滥情好
    2021-01-22 17:38

    Use supervisord

    supervisord is process control system just for the purpose of running multiple command line scripts.

    It features:

    • multiple controlled processes
    • autorestarting failed runs
    • log stdout and stderr output
    • starting scripts in order (using priority)
    • command line utility to view latest log output, stop, start, restart the processes

    This solution works only on *nix based systems, it is not available on Windows.

提交回复
热议问题