Skip to content

Commit

Permalink
Changeover from schedule to apscheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
nikilase committed Apr 4, 2024
1 parent 876687d commit 3270e83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ def main():


def main_apscheduler():
scheduler = BlockingScheduler()
try:
scheduler = BlockingScheduler()

scheduler.add_job(k_m, "cron", second="0/10")
scheduler.add_job(a_m, "cron", minute="0/5")
scheduler.start()
except KeyboardInterrupt:
print("Shutting down from Keyboard Interrupt!")
scheduler.shutdown(wait=False)
sys.exit()


if __name__ == "__main__":
main()
main_apscheduler()

0 comments on commit 3270e83

Please sign in to comment.