Set up a background job in CRHQ — configure the schedule, agent, message, and execution settings.
Create background jobs to automate agent work on a schedule.
| Field | Description |
|---|---|
| Name | Descriptive name (e.g., "Daily Sales Report") |
| Agent | Which agent handles this job |
| Type | New Session or Message Session |
| Message | The instruction sent to the agent when the job runs |
| Schedule | Cron expression defining when it runs |
| Timezone | Your local timezone for scheduling |
| Project | Optional — assign job sessions to a project |
The message is what the agent receives when the job triggers. Write it like you would any instruction:
Generate this week's sales report. Pull data from the sales database,
compare to last week, create an HTML dashboard artifact, and post
the summary with a share link to #sales in Slack.
Be specific — the agent has no prior context (especially with New Session type).
| What you want | Cron expression |
|---|---|
| Every day at 9 AM | 0 9 * * * |
| Weekdays at 8:30 AM | 30 8 * * 1-5 |
| Every Monday at 10 AM | 0 10 * * 1 |
| Every hour | 0 * * * * |
| Every 15 minutes | */15 * * * * |
| First of every month | 0 0 1 * * |
| Setting | Description |
|---|---|
| Timeout | Maximum run time before the job is killed |
| Skip if running | Don't start a new run if the previous is still going |
| Max runs before rotation | For Message Session type — after N runs, start a fresh session |
| Concurrency | How many instances can run simultaneously |
Tip: For long-running tasks, set a generous timeout and enable "skip if running" to prevent overlapping executions.