Product documentation
  • Overview
  • Guide
  • Reference
  • Changelog
Report a problem

Guide

From nothing to a running job

Updated 9 March 202612 minutes

Everything you need for the first job, in order, with nothing assumed.

This guide takes you from an empty directory to a job that runs every night and tells you when it does not.

Installing

Kettle is a single binary. Put it somewhere on your path and check it runs:

kettle --version

There is no daemon, no service to register and nothing written outside the directory you choose.

The schedule file

One block per job. A block needs three things: a name, a schedule and a command.

[job.backup]
schedule = "every day at 03:00 Europe/Madrid"
command = "/usr/local/bin/backup.sh"

The time zone is part of the schedule rather than a global setting, because the two jobs that matter most are usually in different ones.

Running it

kettle run --config kettle.toml

In the foreground it prints one line per run. Under a supervisor it does the same thing into your log.

A scheduled job that fails silently is worse than no job at all. Kettle is built around that sentence.

When something fails

A non-zero exit code is a failure. So is exceeding the timeout, and so is a job that was due and did not start because the previous run had not finished.

  • The failure is logged with the job name and the exit code.
  • Every configured notifier is called once.
  • The next run is attempted at the next scheduled time, not immediately.

What to do next

Read the reference for the full schedule grammar, then add a notifier so that failures reach a person rather than a log file nobody opens.

Product documentation

Kettle: a small tool for scheduled jobs.

Docs

  • Guide
  • Reference

Legal

  • Legal notice
  • Privacy
All rights reserved.