What are Background Jobs?
Background Jobs are OpenSink’s built-in scheduling mechanism.
They let you trigger HTTP endpoints on a fixed interval — reliably, visibly, and without running your own cron infrastructure.
They let you trigger HTTP endpoints on a fixed interval — reliably, visibly, and without running your own cron infrastructure.
“Where do I host this cron, why didn’t it run, and how do I debug it?”OpenSink handles scheduling, execution tracking, and visibility — you own the logic.
What Background Jobs Are (and Aren’t)
What they are
- Reliable HTTP schedulers
- Minutes-based intervals
- Inspectable execution history
- Agent- and automation-friendly
What they are not
- Workflow engines
- Code execution environments
- Task queues
- Event processors
Typical Use Cases
AI Agents
Periodically run an agent:
- Daily research
- Market scanning
- Monitoring tasks
Automation
Trigger internal systems:
- Sync data
- Refresh caches
- Poll APIs
Reporting
Generate outputs on a schedule:
- Daily summaries
- Status reports
- Health checks
How Scheduling Works
OpenSink uses simple, opinionated scheduling — not cron strings.This is intentional. Cron expressions are powerful, but they allow unsafe patterns (every second, overlapping runs, etc.).
- Interval (minutes)
- Start minute (alignment within the hour)
Examples
| Interval | Start minute | Runs at |
|---|---|---|
| 15 min | 0 | 00, 15, 30, 45 |
| 30 min | 5 | 05, 35 |
| 60 min | 0 | Every hour |
| 120 min | 10 | Every 2 hours, at :10 |
Configuring a Job
Execution Visibility
Every time a job runs, OpenSink records a Job Run.What you can see
- Run status (success / failure)
- Execution time
- HTTP response status
- Error messages
Why this matters
- No silent failures
- No guesswork
- Clear audit trail
- Easy debugging
- total runs
- successful runs
- failed runs
- last run time
- next scheduled run
Jobs + Sessions (How They Work Together)
Jobs and Sessions are complementary, not overlapping.
- Background Job runs on a schedule
- Job calls your agent’s execution endpoint
- Agent creates or resumes a Session
- Session produces Items or requests input
Sessions record execution
Example: Daily Trading Agent
This entire flow runs without servers, cron, or schedulers on your side.
Design Principles
Background Jobs are intentionally constrained.
- only schedule HTTP calls
- do not execute user code
- do not manage retries or workflows
- do not interpret responses
- reliable
- debuggable
- predictable
When to Use Background Jobs
Use Jobs when:- execution must happen on a schedule
- reliability matters
- visibility matters
- you don’t want to manage cron
- execution is event-driven
- you need real-time guarantees
- you’re orchestrating workflows
Summary
Background Jobs
Reliable, visible schedulers that trigger work.
Sessions
Durable execution records that track what happened.

