schedule command manages scheduled jobs that run Goose recipes automatically at specified times.
Usage
Subcommands
Add Scheduled Job
Add a new scheduled job.string
required
Unique ID for the recurring scheduled job.Alias:
--idExample: --schedule-id daily-reportstring
required
Cron expression for when to run the job.Examples:
0 * * * *- Every hour at minute 00 9 * * *- Every day at 9:00 AM0 0 * * 1- Every Monday at midnight@hourly- Every hour@daily- Every day at midnight
string
required
Path to recipe file or base64 encoded recipe string.Example:
--recipe-source ./recipes/daily-report.yamlList Scheduled Jobs
List all scheduled jobs.- 🟢
RUNNING- Currently executing - ⏹️
IDLE- Waiting for next scheduled time - ⏸️
PAUSED- Temporarily disabled
Remove Scheduled Job
Remove a scheduled job by ID.string
required
ID of the scheduled job to remove.Alias:
--idList Schedule Sessions
List sessions created by a specific schedule.string
required
ID of the schedule.Alias:
--idnumber
default:"50"
Maximum number of sessions to return.Short:
-lRun Schedule Now
Trigger a scheduled job immediately.string
required
ID of the schedule to run.Alias:
--idCron Expression Help
Show cron expression examples and help.Services Status (Deprecated)
Check status of scheduler services.Services Stop (Deprecated)
Stop scheduler services.Cron Expressions
Format
Standard 5-field:Special Characters
char
Any value - matches all (e.g.,
* in hour = every hour)pattern
Every nth interval (e.g.,
*/5 in minute = every 5 minutes)range
Range of values (e.g.,
1-5 = 1,2,3,4,5)list
List of values (e.g.,
1,3,5 = 1 or 3 or 5)Shorthand Expressions
shorthand
Once a year - equivalent to
0 0 1 1 *Alias: @annuallyshorthand
Once a month - equivalent to
0 0 1 * *shorthand
Once a week - equivalent to
0 0 * * 0shorthand
Once a day - equivalent to
0 0 * * *Alias: @midnightshorthand
Once an hour - equivalent to
0 * * * *Common Examples
Every 15 minutes:Recipe Storage
Scheduled recipes are stored in~/.config/goose/scheduled_recipes/:
Session Tracking
Each scheduled execution creates a session: Session metadata includes:schedule_id- Links to the scheduleworking_dir- Execution directoryname- Session description- Creation timestamp
Error Handling
Invalid cron expression:Examples
Hourly data sync:Built-in Scheduler
Goose includes a built-in scheduler:- No external services required
- Runs within Goose process
- Persistent across restarts
- Automatic session creation
- Error logging and recovery
- Schedules:
~/.config/goose/scheduler.json - Recipes:
~/.config/goose/scheduled_recipes/ - Sessions:
~/.config/goose/sessions/
See Also
- Recipe Command - Working with recipes
- Session Command - Managing sessions
- Scheduling guide (link to guide)