在Windows中计划模块崩溃

问题描述

在Windows上运行脚本时遇到此错误。但是,该脚本在linux环境下运行良好,我无法理解错误的性质。这是代码和控制台错误。

import time
import schedule
import subprocess
import os
import multiprocessing


dir = os.path.dirname(os.path.abspath(__file__))
path_phoenix=os.path.join(dir,'sub','phoenix','automated_Phoenix.py')
path_singlephoenix=os.path.join(dir,'single_phoenix','automated_SinglePhoenix.py')
path_brc=os.path.join(dir,'brc','automated_BRC.py')
path_singlebrc=os.path.join(dir,'single_brc','automated_SingleBRC.py')
path_outperformance=os.path.join(dir,'outperformance','automated_Outperformance.py')
path_cpc=os.path.join(dir,'cpc','automated_CPC.py')


def autorun():
    print("I'm working...")
    def phoenix(file):
        subprocess.run(['python',path_phoenix])
    def singlephoenix(file):
        subprocess.run(['python',path_singlephoenix])
    def brc(file):
        subprocess.run(['python',path_brc])
    def singlebrc(file):
        subprocess.run(['python',path_singlebrc])
    def outperformance(file):
        subprocess.run(['python',path_outperformance])
    def cpc(file):
        subprocess.run(['python',path_cpc]) 


    if __name__ == '__main__':
        files = [path_phoenix,path_singlephoenix,path_brc,path_singlebrc,path_outperformance,path_cpc]
        for i in files:
            p = multiprocessing.Process(target=phoenix,args=(i,))
            q = multiprocessing.Process(target=brc,))
            s = multiprocessing.Process(target=outperformance,))
            t = multiprocessing.Process(target=cpc,))
            u = multiprocessing.Process(target=singlephoenix,))
            v = multiprocessing.Process(target=singlebrc,))
            p.start()
            q.start()
            s.start()
            t.start()
            u.start()
            v.start()
            p.join()
            q.join()
            s.join()
            t.join()
            u.join()
            v.join()

schedule.every().day.at("01:09").do(autorun)

while True:
    schedule.run_pending()
    time.sleep(1)

enter image description here

您知道为什么我会出现此错误吗?请帮助,谢谢

Windows 10 Python 3.8.5

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...