Skip to content
Get started
Get started
Cron Reference: Expressions, Options, MCP
guide · cron jobs

Every field, every option.

The expression syntax with its shortcuts, the full repeat option table with defaults and the naming each SDK uses, plus managing schedules through an AI agent.

Five fields, left to right: minute (0-59), hour (0-23), day of month (1-31), month (1-12), day of week (0-7; both 0 and 7 are Sunday).

ExpressionMeaning
0 9 * * *Every day at 9:00 AM
*/15 * * * *Every 15 minutes
0 0 * * MONEvery Monday at midnight
0 0 1 * *First day of every month

Shortcuts (@daily, @hourly, @weekly, @monthly, @yearly, @midnight) and a six-field form with a leading seconds field are also accepted.

Options on the repeat object of upsertJobScheduler:

OptionDefaultDescription
pattern-Cron expression
every-Interval in ms (alternative to pattern)
timezoneUTC (embedded) / server timezone (TCP)IANA timezone for pattern evaluation
limitunlimitedMax executions, then the scheduler is removed
immediatelyfalseFire once right away on first creation
skipIfNoWorkerfalseSkip a run when no worker is registered for the queue
preventOverlaptrueSkip a run while the previous job is still active
skipMissedOnRestarttrueOn server restart, recompute the next run instead of firing missed runs
Semantic optionBunNode.js / DenoPythonPHPGoRustElixir
cron patternpatternpatternpatternpatternPatternpatternpattern
intervaleveryeveryeveryeveryEveryMsevery_msevery
timezonetimezonetztztzTimezonetimezonetz or timezone
skip with no workerskipIfNoWorkerskipIfNoWorkerskip_if_no_workerskipIfNoWorkerSkipIfNoWorkerskip_if_no_workerskipIfNoWorker
missed-run policyskipMissedOnRestartskipMissedOnRestartskip_missed_on_restartskipMissedOnRestartSkipMissedOnRestart (*bool)server default onlyskipMissedOnRestart
overlap policypreventOverlappreventOverlapprevent_overlappreventOverlapPreventOverlap (*bool)server default onlypreventOverlap

Rust’s scheduler type currently omits skipMissedOnRestart and preventOverlap; both therefore use the server default true. Go uses pointer booleans for those two fields so explicit false is distinct from omission. addCron and every convenience helpers exist in TypeScript and Python only; PHP, Go, Rust, and Elixir use the scheduler API directly.

AI agents can manage cron jobs in natural language (“create a cron that cleans old sessions every hour”) through the MCP Server:

Terminal window
bun add bunqueue @modelcontextprotocol/sdk
claude mcp add bunqueue -- bunx bunqueue-mcp
Job Schedulers from the QueueNamed repeatable schedules on the Queue object
Cron Jobs in BunYour first schedule, in every SDK and from the CLI
Cron RecipesFixed intervals, timezones, repeat-after-completion