diff --git a/iron_condor_scheduler.py b/iron_condor_scheduler.py new file mode 100644 index 0000000..6826448 --- /dev/null +++ b/iron_condor_scheduler.py @@ -0,0 +1,20 @@ +import schedule +import time + +from iron_condor import enter_iron_condor +from multiprocessing import Process + +# TODO: Look up entry times from database. +entry_times = [] + +def enter_trade(): + job_process = Process(target = enter_iron_condor) + job_process.start() + +if __name__ == '__main__': + for entry_time in entry_times: + schedule.every().day.at(entry_time, 'America/Los_Angeles').do(enter_trade) + + while True: + schedule.run_pending() + time.sleep(1) \ No newline at end of file