Scheduled jobs¶
A scheduled job runs a container on a cron schedule: reports, clean-ups, syncs. Unlike an app it is not a server: each run starts, does its work and stops.
Create¶
Scheduled Jobs → Create job:
| Setting | Notes |
|---|---|
| Name | lowercase letters, digits and dashes |
| Image | any container image; for a private one select an image pull secret, as for apps |
| Command and arguments | optional; the image's own entry point is used when empty |
| Environment | literal values, or a key of a secret |
| CPU and memory | what each run gets, up to 4 vCPU and 8 GB |
| Schedule | five-field cron in UTC, numbers only, at most once every 5 minutes |
| Concurrency | what happens when a run is still going at the next scheduled time: skip the new run (default), run both, or replace the old run |
| Timeout | how long a run may take including retries, up to 6 hours |
| Retries | how often a failed run is retried, up to 6 |
Operate¶
- Run now starts a run immediately, outside the schedule.
- Suspend pauses the schedule; a suspended job can still be run by hand.
- The job's page lists recent runs with their status and duration, and shows the logs of a run. The last five successful and five failed runs are kept, for at most seven days.
- Changing a job affects future runs; a run in progress keeps the definition it started with.
- Deleting a job stops a run in progress and removes its history and logs.
What a run can reach¶
A run is a container in your tenant, like an app instance:
- it can reach your tenant's PostgreSQL clusters, queues over AMQP, object storage and the internet;
- it gets exactly the CPU and memory you set;
- it has no persistent disk: write results to object storage or a database.
Limits and metering¶
scheduledJobsquota: 20 per tenant by default.- The CPU and memory of jobs do not count against the vCPU and memory quotas.
- Job run time is not metered at the moment.
Permissions¶
Viewers can see jobs, runs and logs. Creating, changing and deleting jobs and running them by hand are permissions editors hold by default. Each can be granted for some jobs only.
To publish a message on a schedule without running a container, use a scheduled message.