# Cron jobs

> Run a command inside a backend app on a schedule, with its environment variables.

- Product: Kubana Cloud, App Platform
- Web page: https://kubana.cloud/docs/app-platform/cron-jobs
- Last updated: 2026-10-19

Cron jobs run a command inside your app's container on a schedule: a nightly cleanup script, a report, a cache warm-up. They work for every backend app, Laravel and FastAPI included.

## Add a cron job

In the app's **Configuration** tab, open **Cron jobs** and choose **Add cron job**:

- **Name**: unique within the app, like `Nightly cleanup`.
- **Command**: a single line, run from your app's directory with the app's environment variables, e.g. `python -m app.jobs.cleanup` or `php artisan reports:send`.
- **When should it run?**: pick how often in plain words: every few minutes, every few hours, every day, on certain days of the week, or once a month, then the time. Times are in **UTC**, and the form shows the same time in your own timezone. The summary below the schedule shows the next runs in your time, so you can check it before saving.
- **Custom (cron expression)**: for schedules the simple options don't cover, type a 5-field cron expression such as `30 2 * * 1-5` (02:30 UTC on weekdays).
- **Time limit**: a run that takes longer is stopped (30 seconds to 1 hour, default 5 minutes).

An app can have up to 20 cron jobs.

## When changes apply

If the app is running, a new or changed cron job applies right away; you don't need to redeploy. Before the first deploy, cron jobs show **Starts after deploy** and begin running once the app is deployed.

Deleting a cron job stops it right away.

## Good to know

- Each job runs one at a time: a run doesn't start while the previous one is still going.
- Cron jobs run in the same container as your app and share its CPU and memory. Move heavy work to a separate app if it slows your app down.
- For Laravel's scheduler or a Python task library (Celery beat, ARQ, …), use a worker app instead of a cron job per task.
