Scheduling
Definition of the decorator that schedules tasks in GSO that are to run periodically.
CronScheduleConfig
Bases: BaseModel
Configuration for scheduling a task using crontab-like timing parameters.
Source code in gso/schedules/scheduling.py
scheduler(cron_scheduler_config)
Schedule a Celery task using crontab-like timing.
Examples:
minute='*/15'
: Run every 15 minutes.hour='*/3'
: Run every 3 hours.day_of_week='mon-fri'
: Run on weekdays only.day_of_month='1-7,15-21'
: Run on the first and third weeks of the month.month_of_year='*/3'
: Run on the first month of each quarter.
All time units can be specified with lists of numbers or crontab pattern strings for advanced scheduling. All specified time parts (minute, hour, day, etc.) must align for a task to run.