Skip to main content
On this page

Kater CLI Run Kater's services job

kater job tick

Runs the jobs whose schedules are due this minute, in UTC, and any runs still queued.

Cron calls it once a minute, from the line that kater job crontab prints. You seldom run it yourself.

Examples

Terminal window
# Run the jobs due this minute, and any runs still queued
kater job tick --kater-root . --deployment production
# Load the deployment's dotenv file first
kater job tick --kater-root . --deployment production --env-file /srv/kater/production.env

Options

OptionDescription
--deployment <name>Required. The deployment whose jobs to run, such as production.
--env-file <file>A dotenv file that the deployment owns, with secrets such as warehouse credentials. A variable already in the environment wins over the file.

It also takes the global options --json, --kater-root, --scope and --help.

What a tick does

  • Queues the due jobs. Each enabled schedule that matches this minute queues one run. A minute never queues the same job twice.
  • Runs the queue. It runs every queued run in order, and then the jobs that run after each one that succeeds.
  • Cancels changed jobs. A queued run whose job changed in kater.config.yaml is cancelled, with the code job_changed. So is a scheduled run whose schedule was turned off.
  • Marks abandoned runs. A run that a stopped worker left running becomes interrupted. Run the job again to recover it.
  • Waits for another worker. When another tick or run holds the deployment, it does nothing and answers queued.

See also