ConceptsServices
Cron jobs
A cron job is a command that runs on a schedule, then exits.
Deploy. The deploy builds or pulls the image. It starts no container.
1 / 5
A cron job has no instance that runs all the time. Each run is a new container.
Create a cron job
ferry create nightly --type cron --image busybox:stable --schedule "0 3 * * *" --start-cmd 'echo hello'
ferry run nightly --followferry run <name> starts a run immediately.
The schedule
The schedule is a cron expression of 5 fields: minute hour day-of-month month day-of-week. An alias such as @daily or @hourly is also correct.
The schedule is in UTC
Ferry reads the schedule in UTC, not in your local time.
The command is the start command of the service. If the default command of the image does the work, a cron job needs no start command.
- Ferry skips the runs that it missed while the server was down.
- Ferry skips a run when the previous run is not complete.
See Jobs & cron.