Scheduled Jobs
The Context Engine runs background work as jobs: refreshing the metadata it keeps for a data source, reconciling that metadata against what the data source reports, and similar upkeep. Each job has its own schedule. You manage jobs on the Jobs page of the admin console, or through the REST API.
Some jobs are created for you. When you configure how a data source’s metadata is refreshed, the Context Engine creates a refresh job for it. The refresh job reconciles the metadata against the data source as its last step, so reconciliation follows every successful refresh and never a failed one. A separate reconciliation job is also created: it runs only when triggered (for example from the data source’s Reconcile button), unless the data source is refreshed by a job you built yourself, in which case it runs every 6 hours. Each connector that signs in with credentials stored in the Context Engine also gets a discovery job, named discovery_ followed by the connector ID, which re-reads the connector’s tool list and health every 15 minutes by default. Disabling or removing the connector disables or removes its discovery job. You can change these jobs’ schedules, disable them, or run them by hand. You can also create your own.
The Jobs page
Section titled “The Jobs page”The Jobs page lists every job with its data source, its schedule, and the outcome of its last run. Select a job to see its steps and its run history, to edit it, or to run it now.
The schedule column reads in plain English, for example:
Every 60 min from 03:17 UTC · next 14:17 UTC
“Next” is when the job becomes due. The Context Engine checks for due jobs once a minute, so a run starts within a minute of that time. A disabled job shows its schedule without a next time, and a manual job shows “Manual: runs only when triggered”.
Friendly names
Section titled “Friendly names”A job’s name is fixed when the job is created and is often technical, such as discovery_{connector_id}. To make a job easy to recognize, give it a Friendly name (up to 200 characters) when you create it or from its Edit dialog. The Jobs page, the job’s detail page and its runs show the friendly name, with the job’s name beside it in smaller text, and the search box matches either. Clear the field to go back to the name. Friendly names do not have to be unique; anything that addresses a job by name, such as the purge confirmation, still uses the job’s name.
Schedule fields
Section titled “Schedule fields”A schedule runs either on an interval (the default) or only when triggered; see Manual schedules. An interval schedule has three fields.
| Field | Admin console label | What it does |
|---|---|---|
interval_minutes | Run every (minutes) | Minutes between runs. At least 1. |
start_time_utc | Start time (UTC) | The time of day, in UTC and HH:MM form, that runs are counted from. |
startup_delay_seconds | Delay after AgentCube restart (seconds) | How long to wait after the Context Engine starts before the first run of a job that has never run. |
How the start time works
Section titled “How the start time works”A job runs at its start time and then every interval after it: a 60-minute job with a start time of 03:17 runs at 03:17, 04:17, 05:17, and so on, including the hours before 03:17 (00:17, 01:17, 02:17). Runs are counted from the start time on the day the job was created, so an interval that does not divide evenly into a day (50 minutes, say) keeps its spacing across midnight rather than resetting to the start time each day.
Use different start times to keep jobs apart. Two jobs on the same interval with different start times never start on the same check. Jobs the Context Engine creates for you each get their own start time within the interval, so they are spread out by default.
Times are UTC only. There is no time-zone setting.
What happens after downtime
Section titled “What happens after downtime”If the Context Engine is down past one or more of a job’s scheduled times, the job runs once when the Context Engine is back, then returns to its schedule. Missed runs do not pile up.
The restart delay
Section titled “The restart delay”Delay after AgentCube restart only affects a job that has never run: the first run waits this long after the Context Engine starts, so the Context Engine can finish connecting to its connectors first. It is not a way to stagger jobs; use the start time for that. Once a job has run, only its interval and start time decide when it runs next.
Manual schedules
Section titled “Manual schedules”To make a job run only on demand, set Runs to Only when triggered when you create or edit it. A manual job never runs on a schedule; it runs only from Trigger now, the REST API, or an AI agent. Through the API, a manual schedule is {"kind": "manual"} with no other fields (sending interval_minutes with it is refused), and its next_run_at is null.
Manual is not the same as disabled: a manual job stays enabled and can be triggered, while a disabled job cannot run at all. Discovery jobs cannot be made manual; disable one to stop it running.
When a scheduled run is skipped
Section titled “When a scheduled run is skipped”A run can be recorded as skipped instead of running:
- Skipped because the previous run is still going. A job never runs twice at once; the overlapping run is recorded as
skipped_prior_in_flight. - Skipped because sign-in is paused. When a connector’s service account fails to sign in repeatedly, the Context Engine pauses sign-in attempts for that connector for a while, so it does not keep sending a bad credential to your identity provider. Scheduled runs that need that connector are recorded as
skipped_credential_paused, and the Jobs page shows the reason, for example “Skipped: sign-in to {connector_name} is paused until 14:30 UTC”. One skipped run is recorded per scheduled time, not one per minute. Updating the connector’s credentials on the Connectors page ends the pause straight away.
Running a job by hand
Section titled “Running a job by hand”Select a job and choose Trigger now. A manual run starts immediately, whatever its schedule, and appears in the run history with who triggered it. A manual run is allowed even while a connector’s sign-in is paused, so you can check a fix without waiting. A disabled job cannot be triggered, and a job whose previous run is still going cannot be triggered again until that run ends.
A manual run does not move the schedule: the next scheduled run still happens at its usual time.
Run history
Section titled “Run history”Each job’s page lists its recent runs with their outcome, start and end times, and what triggered them (the schedule, the admin console, the API, or an AI agent). Select a run to see each step and, for a failed step, its error.
| Outcome | Meaning |
|---|---|
success | Every step finished. |
partial | Some steps finished and some did not, for example the refresh landed but reconciliation failed. |
failed | A step failed. |
timed_out | The run went past the job’s refresh timeout. |
cancelled | Someone cancelled the run. |
skipped_prior_in_flight | Not run: the previous run was still going. |
skipped_credential_paused | Not run: the connector’s sign-in was paused. |
Managing jobs through the REST API
Section titled “Managing jobs through the REST API”Every Jobs page action has a REST equivalent under /api/v1/admin/jobs, authenticated with a Context Engine API key sent in the X-API-Key header. Create the key on the API keys page of the admin console.
Read a job
Section titled “Read a job”The response (abbreviated below) carries the stored schedule and next_run_at, the time the job next becomes due (null for a disabled or manual job).
$headers = @{ "X-API-Key" = "{api_key}" }Invoke-RestMethod -Uri "{ce_url}/api/v1/admin/jobs/{job_id}" -Headers $headerscurl -H "X-API-Key: {api_key}" \ "{ce_url}/api/v1/admin/jobs/{job_id}"{ "id": "{job_id}", "name": "discovery_{connector_id}", "display_name": "Nightly discovery", "enabled": true, "schedule": { "kind": "interval", "interval_minutes": 15, "start_time_utc": "00:07", "startup_delay_seconds": 20.0 }, "next_run_at": "2026-09-24T14:52:00+00:00", "last_run_summary": { "outcome": "success", "started_at": "2026-09-24T14:37:21+00:00" }}Change a schedule
Section titled “Change a schedule”Send the whole schedule object.
$headers = @{ "X-API-Key" = "{api_key}" }$body = @{ schedule = @{ kind = "interval" interval_minutes = 60 start_time_utc = "03:17" }} | ConvertTo-Json -Depth 3Invoke-RestMethod -Method Patch -Uri "{ce_url}/api/v1/admin/jobs/{job_id}" -Headers $headers -ContentType "application/json" -Body $bodycurl -X PATCH \ -H "X-API-Key: {api_key}" \ -H "Content-Type: application/json" \ -d '{"schedule": {"kind": "interval", "interval_minutes": 60, "start_time_utc": "03:17"}}' \ "{ce_url}/api/v1/admin/jobs/{job_id}"A schedule that does not validate returns 400 and names the field, for example a start time of 25:00:
{ "detail": { "error": "invalid_schedule", "field": "schedule.start_time_utc", "message": "String should match pattern '^([01]\\d|2[0-3]):[0-5]\\d$'" }}To make the job run only when triggered, send {"schedule": {"kind": "manual"}} instead.
Set a friendly name
Section titled “Set a friendly name”Send display_name. An empty string or null clears it; leaving the field out keeps the current value.
$headers = @{ "X-API-Key" = "{api_key}" }$body = @{ display_name = "Nightly discovery" } | ConvertTo-JsonInvoke-RestMethod -Method Patch -Uri "{ce_url}/api/v1/admin/jobs/{job_id}" -Headers $headers -ContentType "application/json" -Body $bodycurl -X PATCH -H "X-API-Key: {api_key}" -H "Content-Type: application/json" -d '{"display_name": "Nightly discovery"}' "{ce_url}/api/v1/admin/jobs/{job_id}"Run a job now
Section titled “Run a job now”$headers = @{ "X-API-Key" = "{api_key}" }Invoke-RestMethod -Method Post -Uri "{ce_url}/api/v1/admin/jobs/{job_id}/trigger" -Headers $headerscurl -X POST -H "X-API-Key: {api_key}" \ "{ce_url}/api/v1/admin/jobs/{job_id}/trigger"The response carries the new run_id and a status_url to poll; GET {ce_url}/api/v1/admin/jobs/{job_id}/runs lists the run history. A disabled job returns 400. If a run is already going, the trigger returns 409 with the error job_run_already_in_flight and that run’s run_id. To cancel a run, send POST {ce_url}/api/v1/admin/jobs/{job_id}/runs/{run_id}/cancel.
Compatibility: the old seconds field
Section titled “Compatibility: the old seconds field”Before version 3.59.0 a schedule was written as {"kind": "interval", "seconds": 3600}. Responses now carry interval_minutes and start_time_utc instead, and no longer include seconds; update any script that reads it.
For now, a request that still sends seconds (and no interval_minutes) is accepted and converted: interval_minutes becomes the seconds divided by 60, rounded up, and the start time defaults to 00:00. Upgrading converts every existing job the same way and gives each its own start time within its interval, so existing jobs keep their frequency without all starting together. This compatibility will be removed in a future release.