I am trying to run multiple files at a single time using multiprocessing module.....
import multiprocessing
import schedule
import time
if len(abc)==1:
def live_run1():
def lv1():
exec(open('/path to file/file1.py').read())
def lv_s():
exec(open('/path to file/file2.py').read())
import multiprocessing
if __name__ == '__main__':
p11 = multiprocessing.Process(target=lv1)
p12 = multiprocessing.Process(target=lv_s)
p11.start()
p12.start()
p11.join()
p12.join()
time.sleep(500)
exec(open('/path to file/file3.py').read())
return schedule.CancelJob
schedule.every().day.at("10:30").do(live_run1)
while True:
schedule.run_pending()
time.sleep(1)
the error i got :
pickle.PicklingError: Can't pickle <function past_match_sim at 0x7fa26e03b7b8>: attribute lookup past_match_sim on __main__ failed
I am not able to come out from this problem....
Appreciate any help