python scheduler

Reading:

APScheduler

Trigger can be date, interval, and cron.

Cron Trigger Time Parameter

  • year: int|str 4-digit year
  • month: int|str month 1-12
  • day: int|str day of the 1-31
  • week: int|str ISO week 1-53
  • day_of_week: int|str number or name of weekday 0-6 or mon,tue,wed,thu,fri,sat,sun
  • Note that the first weekday is Monday.
  • hour: int|str 0-23
  • minute: int|str 0-59
  • second: int|str and0-59
  • start_date: datetime|str earliest possible date/time to trigger on (inclusive)
  • end_date: datetime|str latest possible date/time to trigger on (inclusive)
  • timezone: datetime.tzinfo|str time zone to use for the date/time caculations (defaults to scheduler timezone)

Expressions

Date Trigger Time Parameter

  • run_date: datetime|str the date/time to run the job at
  • timezone: datetime.tzinfo|str time zone for run_date if it dosen’t have on already