From charlesreid1

APScheduler docs: https://apscheduler.readthedocs.io/en/3.0/

Simple example: https://devcenter.heroku.com/articles/clock-processes-python

Install it:

pip install apscheduler

Add it to requirements.txt:

APScheduler==3.0.0

Simple clock.py example from here:

from apscheduler.schedulers.blocking import BlockingScheduler

sched = BlockingScheduler()

@sched.scheduled_job('interval', minutes=3)
def timed_job():
    print('This job is run every three minutes.')

@sched.scheduled_job('cron', day_of_week='mon-fri', hour=17)
def scheduled_job():
    print('This job is run every weekday at 5pm.')

sched.start()