Creating Jobs

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.

Creating a New Job

  1. Go to Settings → Jobs
  2. Click Create Job
  3. Configure the job:
FieldDescription
NameDescriptive name (e.g., "Daily Sales Report")
AgentWhich agent handles this job
TypeNew Session or Message Session
MessageThe instruction sent to the agent when the job runs
ScheduleCron expression defining when it runs
TimezoneYour local timezone for scheduling
ProjectOptional — assign job sessions to a project
  1. Click Save

Writing the Job Message

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).

Schedule Examples

What you wantCron expression
Every day at 9 AM0 9 * * *
Weekdays at 8:30 AM30 8 * * 1-5
Every Monday at 10 AM0 10 * * 1
Every hour0 * * * *
Every 15 minutes*/15 * * * *
First of every month0 0 1 * *

Advanced Settings

SettingDescription
TimeoutMaximum run time before the job is killed
Skip if runningDon't start a new run if the previous is still going
Max runs before rotationFor Message Session type — after N runs, start a fresh session
ConcurrencyHow many instances can run simultaneously

Tip: For long-running tasks, set a generous timeout and enable "skip if running" to prevent overlapping executions.