Skip to main content
The schedule command manages scheduled jobs that run Goose recipes automatically at specified times.

Usage

Subcommands

Add Scheduled Job

Add a new scheduled job.
Options:
string
required
Unique ID for the recurring scheduled job.Alias: --idExample: --schedule-id daily-report
string
required
Cron expression for when to run the job.Examples:
  • 0 * * * * - Every hour at minute 0
  • 0 9 * * * - Every day at 9:00 AM
  • 0 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.yaml
Examples:
Output:

List Scheduled Jobs

List all scheduled jobs.
Example output:
Status indicators:
  • 🟢 RUNNING - Currently executing
  • ⏹️ IDLE - Waiting for next scheduled time
  • ⏸️ PAUSED - Temporarily disabled

Remove Scheduled Job

Remove a scheduled job by ID.
Options:
string
required
ID of the scheduled job to remove.Alias: --id
Example:
Output:

List Schedule Sessions

List sessions created by a specific schedule.
Options:
string
required
ID of the schedule.Alias: --id
number
default:"50"
Maximum number of sessions to return.Short: -l
Example:
Output:

Run Schedule Now

Trigger a scheduled job immediately.
Options:
string
required
ID of the schedule to run.Alias: --id
Example:
Output:

Cron Expression Help

Show cron expression examples and help.
Output:

Services Status (Deprecated)

Check status of scheduler services.
Output:

Services Stop (Deprecated)

Stop scheduler services.
Output:

Cron Expressions

Format

Standard 5-field:
Extended 6-field (with seconds):

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: @annually
shorthand
Once a month - equivalent to 0 0 1 * *
shorthand
Once a week - equivalent to 0 0 * * 0
shorthand
Once a day - equivalent to 0 0 * * *Alias: @midnight
shorthand
Once an hour - equivalent to 0 * * * *

Common Examples

Every 15 minutes:
Every hour at 30 minutes:
Every 2 hours:
Business hours (9 AM - 5 PM, weekdays):
First day of month:
Weekends only:

Recipe Storage

Scheduled recipes are stored in ~/.config/goose/scheduled_recipes/:
When you add a schedule, the recipe is copied to this directory.

Session Tracking

Each scheduled execution creates a session: Session metadata includes:
  • schedule_id - Links to the schedule
  • working_dir - Execution directory
  • name - Session description
  • Creation timestamp
View scheduled sessions:

Error Handling

Invalid cron expression:
Job already exists:
Job not found:
Recipe validation error:

Examples

Hourly data sync:
Daily report at 9 AM:
Weekly cleanup on Sundays:
Test schedule immediately:
Remove old schedule:

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
Storage:
  • Schedules: ~/.config/goose/scheduler.json
  • Recipes: ~/.config/goose/scheduled_recipes/
  • Sessions: ~/.config/goose/sessions/

See Also