modal-scheduling
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Schedule recurring and periodic jobs on Modal with Cron and Period. Use when running daily reports, periodic data pipelines, scheduled model retraining, or any time-based automation.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when scheduling Functions to run automatically at fixed intervals or cron-based schedules.
- Distinctive: line 100
Use the "run now" button on the App dashboard to trigger manually
- Very specific: line 112
Ensure you used modal deploy, not modal run
- Distinctive: line 113
Check the schedule parameter syntax
- Distinctive: line 114
Verify the app is visible in the Modal dashboard
- Distinctive: line 117
Default timezone is UTC
- Very specific: line 118
Use timezone= parameter: Cron("0 8 * * *", timezone="America/New_York")
- Distinctive: line 122
Use Cron for deploy-independent schedules
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modal Scheduling
Use this skill when scheduling Functions to run automatically at fixed intervals or cron-based schedules.
When to Use This Skill
- Running daily/weekly/hourly jobs
- Scheduling data pipeline runs
- Periodic model retraining
- Automated monitoring or reporting
- Any time-based automation
Quick Start
import modal
app = modal.App()
@app.function(schedule=modal.Period(days=1))
def daily_job():
print("Running daily task")Activate with: modal deploy script.py
Schedule Types
Period (interval-based)
Runs at fixed intervals from the time of deployment:
@app.function(schedule=modal.Period(hours=5))
def every_five_hours():
...
@app.function(schedule=modal.Period(minutes=30))
def half_hourly():
...Redeployment resets the Period timer.
Cron (cron syntax)
Runs at specific times using cron expressions:
# 8 AM UTC every Monday
@app.function(schedule=modal.Cron("0 8 * * 1"))
def weekly_report():
...
# 6 AM New York time daily
@app.function(schedule=modal.Cron("0 6 * * *", timezone="America/New_York"))
def morning_report():
...Cron schedules are not affected by redeployment timing.
Cron Syntax
┌─── minute (0-59)
│ ┌─── hour (0-23)
│ │ ┌─── day of month (1-31)
│ │ │ ┌─── month (1-12)
│ │ │ │ ┌─── day of week (0-7, 0/7=Sunday)
│ │ │ │ │
* * * * *| Expression | Meaning |
0 8 * * * | Daily at 8 AM UTC |
0 8 * * 1 | Every Monday at 8 AM UTC |
*/15 * * * * | Every 15 minutes |
0 0 1 * * | First day of month at midnight |
Deployment
Schedules only activate with modal deploy:
modal deploy --name my-scheduled-app script.pymodal run does NOT activate schedules.
Monitoring
- Execution logs:
modal-observability(modal app logs <app> --since …) - Use the "run now" button on the App dashboard to trigger manually
- Schedules cannot be paused — remove the schedule and redeploy to stop
Go/TypeScript SDK Note
Scheduling (modal.Cron, modal.Period) is Python-only. Go and TypeScript SDKs cannot define schedules.
To trigger Modal Functions on a schedule from Go/TS, use an external scheduler (e.g., cron job, cloud scheduler) that calls fn.Spawn() / fn.spawn().
Symptom Triage
"Schedule doesn't run"
- Ensure you used
modal deploy, notmodal run - Check the schedule parameter syntax
- Verify the app is visible in the Modal dashboard
"Cron runs at wrong time"
- Default timezone is UTC
- Use
timezone=parameter:Cron("0 8 * * *", timezone="America/New_York")
"Period resets after deploy"
- Expected behavior; Period counts from deployment time
- Use Cron for deploy-independent schedules
Reference Map
references/cron-scheduling.md— Cron/Period details, timezone, monitoring
Related Skills
modal-fundamentals— deploy/rollover CLI; schedules requiremodal deploymodal-observability— dashboard logs for scheduled runs;.get_dashboard_url()modal-parallel-execution— fan-out work from a scheduled entrypoint
Guardrails
- Schedules only work with
modal deploy(notmodal run) - Period resets on each redeployment; use Cron for stable schedules
- Cannot pause schedules — remove and redeploy to stop
- Each scheduled Function runs independently with its own autoscaling
In this repository80 other files it gives its agents.
- a11y-accessibility-designSkill
- agentic-ui-patternsSkill
- ai-native-ui-designSkill
- ai-ui-anti-patternsSkill
- ai-ui-heuristicsSkill
- calm-technology-uiSkill
- conversion-growth-designSkill
- cross-platform-designSkill
- dark-mode-designSkill
- data-visualizationSkill
- design-systemsSkill
- design-thinking-processSkill
- error-empty-statesSkill
- ethical-design-patternsSkill
- form-uxSkill
- information-architectureSkill
- interaction-design-patternsSkill
- internationalization-uiSkill
- mobile-touch-designSkill
- modal-classes-lifecycleSkill
- modal-container-imagesSkill
- modal-dicts-queuesSkill
- modal-endpointsSkill
- modal-fundamentalsSkill
- modal-gpu-computeSkill
- modal-networkingSkill
- modal-observabilitySkill
- modal-parallel-executionSkill
- modal-sandboxesSkill
- modal-scaling-performanceSkill
- modal-secretsSkill
- modal-serversSkill
- modal-storageSkill
- modal-web-servingSkill
- modal-workspace-adminSkill
- motion-design-principlesSkill
- notifications-permissionsSkill
- onboarding-uxSkill
- rust-api-designSkill
- rust-async-programmingSkill
- rust-cargo-masterySkill
- rust-cli-applicationsSkill
- rust-clippy-lintsSkill
- rust-closures-iteratorsSkill
- rust-compiler-internalsSkill
- rust-concurrencySkill
- rust-design-patternsSkill
- rust-editionsSkill
- rust-embeddedSkill
- rust-error-handlingSkill
- rust-game-developmentSkill
- rust-lifetimes-borrowingSkill
- rust-macrosSkill
- rust-performanceSkill
- rust-rustdocSkill
- rust-rustup-toolchainSkill
- rust-smart-pointersSkill
- rust-testing-benchmarkingSkill
- rust-type-systemSkill
- rust-unsafe-ffiSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

