Skip to content

Cron jobs

Cron jobs run a command inside one of your service’s containers on a schedule — handy for maintenance tasks, report generation, cache warming, and the like.

  1. Open a service and go to its Cron tab.
  2. Click New cron job and give it a name.
  3. Enter a schedule (a standard cron expression, e.g. 0 3 * * *) and the command to run inside the container.
  4. Save. Leave it enabled, or create it paused and enable it later.

The cron tab of a service

From the Cron tab you can also run a job now (out of schedule) and review its run history — each run records its status, exit code, and timing.

Terminal window
bitsreef cron create nightly-cleanup \
--schedule "0 3 * * *" \
--command "python manage.py cleanup" \
--service web
bitsreef cron list --service web
bitsreef cron trigger nightly-cleanup --service web # run now
bitsreef cron runs nightly-cleanup --service web # run history
bitsreef cron delete nightly-cleanup --service web

A cron job runs a command inside an existing service — reusing that service’s image, env, and volumes. A scheduled function runs standalone code on a schedule without a long-running service. Use whichever fits.