Skip to main content
A job runs commands on a rig on a cron schedule. Create and manage jobs through the API with an API key in AMIKA_API_KEY. Every route takes the job’s ID or its name. In the web UI, the Jobs page lists your jobs. You can also create, pause, and resume them there. For every field and response, see the API reference.

Create a job

The Idempotency-Key is any string unique to this job. If you send the same key again, Amika creates the job only once.
  • trigger.schedule: a 5-field cron expression, or @hourly, @daily, or @weekly. Runs must be at least 5 minutes apart. timezone is an IANA name. The default is UTC.
  • steps: 1 to 20 commands. They run in order, and a run stops at the first failure. Step 0 names the rig with rig_id, rig_name, or rig_create (a new rig for each run). Later steps run on the same rig. Each step is a command run.
  • rig_status_on_finish: active, stopped, or deleted when a run ends.
  • overlap_policy: skip (the default) does not start a scheduled run while the previous one runs. allow starts it.
  • enabled: false: creates the job paused.

Run a job now

A manual run does not wait for a running one to finish. Send an Idempotency-Key so that a retry starts the run only once.

List a job’s runs

Runs come newest first. Filter with status or trigger_kind. Each run lists one command run per step in command_run_ids. To read a step’s output, see Command runs.

Pause or resume a job

"enabled": true resumes the job. The same PATCH changes the schedule or the steps.

Delete a job

This deletes the job and its runs. The command runs stay. You cannot delete a job while one of its runs is pending or running. Pause the job, and try again when the run finishes.

Next steps

Command runs

Run one command on a rig, and read its output.

API reference

Every field of the job and job run endpoints.

Create a rig

Set up the rig that a job runs on.

Programmatic usage

Script a rig and an agent from the CLI or TypeScript.