/harness/cronjobs prefix and are verified against the Harness Runtime packaged and deployed by AgentKit CLI 0.54.0
Enable scheduled tasks
These routes exist only whencronjob is enabled for a Harness deployed by AgentKit CLI. A standalone VeADK base service does not expose them, and a Harness deployment without scheduled tasks does not mount these paths
This version supports service-authenticated Harnesses, such as Runtime API key authentication, with direct access to model credentials. Shared OAuth deployments depend on an interactive user’s delegated identity and do not support background scheduled tasks
Prepare an existing TOS bucket and enable the feature from the directory containing harness.yaml
harness.yaml
Send requests
SetHARNESS_URL to the deployment’s Runtime base URL and HARNESS_TOKEN to its access credential. Do not use the model API key for Runtime API authentication
cronjob_id returned by creation and use it as the job_id path parameter. Once an execution exists, obtain run_id from the task’s active.run_id, last_run.run_id, or execution history
Scheduling and execution behavior
Each execution uses a separate session. Task overrides use the
harness structure documented by this section’s create endpoint; omitted fields inherit the deployed agent. Final output is persisted in TOS, so history remains readable even if a local session is lost
External effects are not guaranteed to happen exactly once. Cancellation and interruption cannot undo actions already completed by tools; inspect results before resuming
Results and pagination
GET /harness/cronjobs lists tasks with a default page size of 100. GET /harness/cronjobs/{job_id}/runs lists execution history with a default page size of 20. Both accept limit from 1–1000. Pass next_cursor unchanged to the next request; an empty string indicates the final page
Execution states are queued, running, succeeded, failed, cancelled, skipped, and interrupted. History is ordered by scheduled occurrence, newest first. For newly completed results not yet persisted in history, read the task’s active field or the individual execution result
Pausing prevents future starts and cancels queued execution without stopping a running execution. Cancellation requests can stop a particular running occurrence and are normally checked within about 20 seconds with default settings. Scheduler status describes the replica serving the request rather than aggregate cluster status
Idempotent creation
Creation acceptsidempotency_key. An identical request with the same key returns the original task and HTTP 201; different input with that key returns 422. Without a key, every request creates a new task. Reuse the original key when retrying creation