All pages

Run

Scheduled jobs

A command on a schedule, run in the application's own image with its variables and database.

Creating one

Terminal
arrah cron create my-api --name cleanup --schedule "0 3 * * *" --run "python manage.py cleanup"
arrah cron run my-api cleanup     # run it once now and see what it prints

Schedules

Five cron fields in UTC, such as */15 * * * * or 0 3 * * 1-5, or @hourly, @daily, @weekly, @monthly. At most once every 5 minutes, 10 jobs per project, 15 minutes per run unless you raise it (up to an hour).

How it behaves

  • Each run is a fresh container from the version that is live, removed when the command ends. Output and exit status of the last 50 runs are kept.
  • A job never overlaps itself: if the previous run is still going, that turn is skipped.
  • It runs while the application sleeps, but not while it is stopped or has never been deployed.
  • A failed run sends a notification.