I am trying to contribute to a project on Github for collecting financial data.
The code..
# time_keeper.py
from apscheduler.scheduler import Scheduler
class TimeKeeper:
def __init__(self):
self.sched = Scheduler()
def queue_job(self):
print("message send to queue")
def start_timers(self):
self.sched.start()
self.sched.add_cron_job(self.queue_job, minute='0-59')
if __name__ == "__main__":
from time_keeper import TimeKeeper
TimeKeeper().start_timers()
The problem is, once the script is executed it runs for a split second then stops, there are no traceback errors.
Is the function incorrectly called or am I missing some parts of code? The Communities help would be much appreciated!