
Reading:
APScheduler
Trigger can be date, interval, and cron.
Cron Trigger Time Parameter
year: int|str4-digit yearmonth: int|strmonth 1-12day: int|strday of the 1-31week: int|strISO week 1-53day_of_week: int|strnumber or name of weekday 0-6 or mon,tue,wed,thu,fri,sat,sun- Note that the first weekday is Monday.
hour: int|str0-23minute: int|str0-59second: int|strand0-59start_date: datetime|strearliest possible date/time to trigger on (inclusive)end_date: datetime|strlatest possible date/time to trigger on (inclusive)timezone: datetime.tzinfo|strtime zone to use for the date/time caculations (defaults to scheduler timezone)
Expressions
*Fire on every value*/aFire every a values, starting from the minimuma-bFire on any value within the a-b range (a must be smaller than b)a-b/cFire every c values within the a-b rangexth yFire on the x-th occurrence of weekday y within the monthlast xFire on the last occurrence of weekday x within the monthlastFire on the last day within the monthx,y,zFire on any matching expression; can combine any number of any of the above expressions
Interval Trigger Time Parameter
weeks: intnumber of weeks to waitdays: intnumber of days to waithours: intnumber of hours to waitminutes: intnumber of minutes to waitseconds: intnumber of seconds to waitstart_date: datetime|strstarting point for the interval calculationend_date: datetime|strlatest possible date/time to trigger ontimezone: datetime.tzinfo|strtime zone to use for the date/time calculations
Date Trigger Time Parameter
run_date: datetime|strthe date/time to run the job attimezone: datetime.tzinfo|strtime zone for run_date if it dosen’t have on already




近期评论