APScheduler

timezone #

class Config:
    SCHEDULER_API_ENABLED = True
    SCHEDULER_TIMEZONE = 'America/Los_Angeles'

app = Flask(__name__)
app.config.from_object(Config())

ap_scheduler = APScheduler(
    scheduler=BackgroundScheduler(timezone='America/Los_Angeles'))
ap_scheduler.init_app(app)
ap_scheduler.start()

@ap_scheduler.task('cron', id='first_job', minute='*')
def task_by_minute():
    pass