标签: python centos daemon spawn
我一直在尝试os.spawnv在后台运行脚本
os.spawnv(os.P_NOWAIT, "/home/R/daemon_excel.py", ["arg1", "arg3", "arg2"])
但是daemon_excel.py没有运行
答案 0 :(得分:1)
替代方案:使用subprocess:
subprocess
subprocess.check_call("/home/R/daemon_excel.py arg1 arg3 arg2 &", shell=True)