Skip to main content
On this page

Kater CLI Run Kater's services job

kater job crontab

Prints the crontab line that runs a deployment's jobs on schedule.

It checks kater.config.yaml first, and never installs the line. Add the line to the crontab of the account that runs Kater.

Examples

Terminal window
# Print the crontab line for the production deployment
kater job crontab --kater-root . --deployment production
# Print a line that also loads the deployment's dotenv file
kater job crontab --kater-root . --deployment production --env-file /srv/kater/production.env

Options

OptionDescription
--deployment <name>Required. The deployment whose jobs the line runs, such as production.
--env-file <file>A dotenv file that the deployment owns. The line passes it to each tick, which loads it. The file must exist.

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

The line

The line runs kater job tick once a minute, with --json. It uses the Python that runs this command, and the content root as a full path. The tick checks each schedule in UTC. The account that runs it needs a trusted administrator identity in its environment. A path with a line break or a percent sign is refused.

crontab
# Kater deployment jobs: UTC schedules are evaluated by the runner.
# Requires a configured trusted administrator identity in the runner environment.
* * * * * cd /srv/kater-content && /srv/kater/.venv/bin/python -m kater_cli job tick --kater-root /srv/kater-content --deployment production --json

See also