Schedules represent a time frame to repeatedly run a Modal function.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/modal-labs/modal-client/llms.txt
Use this file to discover all available pages before exploring further.
modal.Cron
Cron jobs are a type of schedule, specified using the Unix cron tab syntax.Constructor
Cron expression string (e.g., “0 9 * * *”).
Timezone for the schedule (e.g., “America/New_York”).
Usage
Examples
modal.Period
Create a schedule that runs every given time interval.Constructor
Number of years between runs.
Number of months between runs.
Number of weeks between runs.
Number of days between runs.
Number of hours between runs.
Number of minutes between runs.
Number of seconds between runs. Only this parameter can be a float.
Usage
Notes
Only
seconds can be a float. All other arguments are integers.days=1 will trigger the function the same time every day. This does not have the same behavior as seconds=86400 since days have different lengths due to daylight savings and leap seconds.Similarly, using months=1 will trigger the function on the same day each month.