Jobs and cron
Run a command once on a live release, run one on a schedule as a cron job, or call a URL on a schedule.
Three ways to run work that is not a long-running server:
| Runs | Use it for | |
|---|---|---|
| Job | A command, once, on a service's live release | Backfills, one-time scripts, data fixes |
| Cron job | A command, on a schedule, as its own service | Nightly reports, cleanups, syncs |
| Scheduled URL | A GET to a URL, on a schedule | Poking an endpoint your app already has |
Jobs
A job runs one command on a service's live release: a new instance with the same image and environment variables. It keeps its logs after it ends.
# Runs on the live release and prints its output; the CLI exits with the command's code.
bweze jobs run <serviceId> -- npm run backfill --since 2026-11-01
# Start it and return its ID without waiting.
bweze jobs run <serviceId> -d --time-limit 2h -- ./scripts/reindex.sh
bweze jobs list <serviceId>
bweze jobs logs <serviceId> <jobId> --follow
bweze jobs cancel <serviceId> <jobId>Or from the service's Jobs panel in the dashboard, or the API:
curl -X POST https://api.bweze.com/v1/services/SERVICE_ID/jobs \
-H "authorization: Bearer bw_sk_..." -H "content-type: application/json" \
-d '{ "command": "npm run backfill", "timeout_seconds": 3600 }'- A job is stopped at its time limit: one hour unless you set another (one minute to twelve hours).
- Up to three jobs run at once per service; a fourth is refused with
429 too_many_jobs. - The service must have a live release (
409 not_deployedotherwise), and hosting must not be stopped for an empty wallet (402 workspace_suspended). - Running or stopping a job needs
terminal:exec, since it runs a command with the service's secrets; reading runs and logs needsdeployment:read. GET /v1/services/{id}/jobs/{jobId}?after=<line id>returns the run and up to 2,000 log lines after the one you last saw, so you can poll for more.
Cron jobs
A cron job is a service whose start command runs on a schedule; nothing runs between runs. Pick Cron job as the type when you deploy, then set the schedule:
bweze services set <serviceId> --schedule "0 2 * * *" --time-limit 30m- The schedule has five fields in UTC:
minute hour day-of-month month day-of-week.0 2 * * *is 02:00 UTC (04:00 in Kigali), every day. - A run is stopped at its time limit: one hour unless you set another, twelve at most.
- A run never overlaps the one before it. If one is still going when the next is due, the next is skipped and listed as skipped.
bweze jobs list <serviceId>shows past runs and the next ones.
Scheduled URLs
A scheduled URL sends a plain GET to a URL on a cron schedule. Add one on
the project's Cron jobs page, or:
bweze projects cron create <projectId> -n nightly-report -s "0 6 * * *" -u https://acme.bweze.app/api/report
bweze projects cron disable <jobId>Each call times out after 20 seconds and does not follow redirects. It carries no signature, so make the endpoint safe to call by anyone, or check a secret in the URL.
Billing
Jobs, cron runs and pre-deploy commands are billed like the service while they run, for their memory and CPU. See Pricing.