Jobs You Don't Schedule

Declarative YAML cron. Reliable pipelines that actually run. No infrastructure babysitting.

AI agents are reactive by default. They respond when you ask. But production AI needs to be proactive. Daily reports. Scheduled data syncs. Automated content publishing. Monitoring and alerts.

SystemPrompt provides declarative job scheduling. Define jobs in YAML. They run reliably.

The Problem

Building job scheduling infrastructure requires:

  • Cron parsing: Interpreting cron expressions correctly
  • Job execution: Running jobs in isolated contexts
  • Failure handling: Retries, backoff, dead letter queues
  • Monitoring: Job status, execution history, alerts
  • Concurrency: Preventing duplicate runs, handling long-running jobs
  • Persistence: Surviving restarts, maintaining state

Most teams use external services (AWS Lambda, Cloud Functions) or deploy separate job runners. More infrastructure to maintain.

The Solution

SystemPrompt includes a job scheduler:

Declarative Job Definition

Define jobs in YAML:

# services/scheduler/daily-jobs.yaml
jobs:
  daily_report:
    cron: "0 9 * * *"  # Every day at 9 AM
    task: "analytics:generate_daily_report"
    enabled: true

  content_sync:
    cron: "*/15 * * * *"  # Every 15 minutes
    task: "content:sync_external_sources"
    enabled: true

  weekly_cleanup:
    cron: "0 0 * * 0"  # Every Sunday at midnight
    task: "maintenance:cleanup_old_files"
    enabled: true

Job Management CLI

# List all jobs
systemprompt infra jobs list

# Run a job manually
systemprompt infra jobs run daily_report

# View execution history
systemprompt infra jobs history

# Enable/disable jobs
systemprompt infra jobs enable content_sync
systemprompt infra jobs disable weekly_cleanup

Agent-Triggered Jobs

Schedule agents to run on a schedule:

# services/scheduler/agent-jobs.yaml
jobs:
  morning_briefing:
    cron: "0 8 * * 1-5"  # Weekdays at 8 AM
    agent: briefing-agent
    message: "Generate today's briefing"

  content_review:
    cron: "0 10 * * *"  # Daily at 10 AM
    agent: content-reviewer
    message: "Review yesterday's content for quality"

Reliable Execution

Jobs run reliably with:

  • Automatic retries on failure
  • Configurable timeout limits
  • Execution locking (no duplicate runs)
  • Detailed execution logs

Why This Matters for AI

Deterministic + Agentic

Some tasks need to run at specific times (deterministic). Others need AI reasoning (agentic). SystemPrompt combines both:

jobs:
  data_collection:
    cron: "0 */6 * * *"  # Deterministic: every 6 hours
    task: "data:collect_metrics"

  analysis:
    cron: "0 9 * * *"
    agent: analyst  # Agentic: AI analyzes the data
    message: "Analyze yesterday's metrics and identify anomalies"

Proactive AI

Move from reactive to proactive AI:

  • Morning briefings: AI summarizes what happened overnight
  • Content scheduling: AI writes and publishes on a schedule
  • Monitoring: AI reviews logs and alerts on issues
  • Maintenance: AI cleans up, optimizes, and maintains

Workflow Orchestration

Chain jobs into workflows:

jobs:
  step_1_collect:
    cron: "0 6 * * *"
    task: "pipeline:collect_data"

  step_2_process:
    cron: "0 7 * * *"
    task: "pipeline:process_data"
    depends_on: step_1_collect

  step_3_report:
    cron: "0 8 * * *"
    agent: reporter
    message: "Generate report from processed data"
    depends_on: step_2_process

What You Skip

Without SystemPrompt With SystemPrompt
Cron daemon setup YAML config
Job runner infrastructure Built in
Retry logic Automatic
Execution monitoring Built in
Cloud function costs Included
Separate deployment Same platform

Getting Started

Create a job in services/scheduler/:

# services/scheduler/my-jobs.yaml
jobs:
  hello_world:
    cron: "* * * * *"  # Every minute
    task: "example:hello"
    enabled: true
# List jobs
systemprompt infra jobs list

# Run manually
systemprompt infra jobs run hello_world

# View history
systemprompt infra jobs history --job hello_world

See the Scheduler Reference for detailed configuration options.