FerryDocs
ConceptsJobs & cron

Create a cron job

A cron job is a service with a schedule. Each time of the schedule starts one run.

Edit on GitHub
Schedule0 3 * * *Run 1Mon 03:00 UTCRun 2Tue 03:00 UTCRun 3Wed 03:00 UTC

A cron job has a schedule. Between two runs, it has no container.

1 / 5

A is a service that runs its command on a .

Create it

Terminal
ferry create nightly --type cron --image busybox:stable \
  --schedule "0 3 * * *" --start-cmd 'echo "nightly run at $(date)"' --follow
Output (excerpt)
==> Pinned busybox:stable as ferry/nightly:dep-4f09d911d31f407fb043
==> Limits: 512 MiB memory, 1 CPU per run
==> Your cron job is live 🎉 (schedule: 0 3 * * *, UTC)

A cron job gets its as each other service does: from a repository, from ferry up, or from --image. But its deploy starts no container. The deploy only saves the image, the variables, the command and the limits for the runs.

The is the command of each . With no start command, a run uses the default command of the image.

Run it now

Terminal
ferry run nightly --follow                       # trigger the cron job now

On a cron job, ferry run runs the command of the cron job. You give no command.

On this page