Skip to main content
On this page

Kater CLI Run Kater's services job

kater job

Runs a deployment's scheduled jobs: connection syncs and test runs, on a schedule or right after another job.

These commands are for the platform admins who run Kater on a server. Agents and the Files terminal cannot run them. See Scheduled jobs.

Commands

CommandWhat it does
kater job listList a deployment’s jobs, next runs and last runs.
kater job runRun one job now, then the jobs set to follow it.
kater job tickRun the jobs due this minute, and any still queued.
kater job historyList a deployment’s past job runs, newest first.
kater job crontabPrint the crontab line that runs jobs on schedule.

Jobs in kater.config.yaml

Jobs live in kater.config.yaml at the content root. A job runs kater sync or kater test for one connection. It runs on its own schedule, or after another job of the same connection and deployment, right after that job succeeds.

kater.config.yaml
jobs:
sync_snowflake:
command: kater sync
connection: snowflake_prod_connection
deployment: production
schedule:
enabled: false
cron: "0 2 * * *"
timezone: UTC
test_snowflake:
command: kater test
connection: snowflake_prod_connection
deployment: production
after: sync_snowflake
  • One trigger. A job has a schedule or an after, not both.
  • UTC schedules. timezone is always UTC. A schedule is off until enabled is true.
  • One job per command. Each command, connection and deployment has one job at most.

How jobs run

  • Root and deployment are explicit. Every job command needs --kater-root and --deployment. It never uses a saved scope, and it refuses --scope.
  • An administrator runs them. The commands that read kater.config.yaml need a trusted administrator identity in the environment.
  • One worker at a time. One kater job tick or kater job run works on a deployment at a time. While one works, another leaves its runs queued for the next tick.
  • Automatic runs need cron. Install the line that kater job crontab prints.
  • Browser sign-in fails a job. A job fails without running when its connection’s warehouse credential needs a person to sign in. The Warehouse settings table says when.
  • Run state stays on the server. Kater keeps each run in .kater/jobs/runs.sqlite3, under the content root.

Examples

Terminal window
# List the production deployment's jobs, their next runs and their last runs
kater job list --kater-root . --deployment production
# Run the sync_snowflake job now, then test_snowflake, which runs after it
kater job run sync_snowflake --kater-root . --deployment production
# Print the crontab line that runs the jobs on schedule
kater job crontab --kater-root . --deployment production

See also