Before you start
- Code that exits when its work is done. A run that exits with code 0 succeeded; any other exit code means it failed.
Create a cron job or a one-off job
1
Start a new app
On Apps, click New service. Pick GitHub or Docker image and choose your code.
2
Choose the type
Under What it is, choose Scheduled task for a cron job, or Runs once for a one-off job.

3
Set the schedule
For a scheduled task, enter the Schedule as a five-field cron expression, in UTC.
0 2 * * * runs every day at 02:00. You can pick another time zone later in Settings.4
Deploy
Pick a Size, add environment variables if the code needs them, and click Deploy.
Start a run now
Open the app and click Run now at the top of the page. It works for both cron jobs and one-off jobs, once the app is live, and opens the Runs tab.Read the run history
The Runs tab lists each run, newest first:- Its state: pending, running, succeeded, failed or canceled.
- What started it: the schedule, or a manual run.
- When it started, and why it failed for a failed run.
Change the schedule, time zone or overlap rule
Open Settings, Cron:- Schedule: five fields, minute, hour, day of month, month and day of week.
*/15 * * * *runs every 15 minutes. - Timezone: a time zone name such as
Europe/London. The default is UTC. Set it here, not inside the schedule. - Concurrency: what happens when a run is due while the last one is still running.
Click Save.
Pause a cron job
Pause at the top of the app page stops the schedule. A run missed while the app is paused is skipped, not started when you resume. See Pause and resume an app. A one-off job has nothing to pause: it runs only when you start it.How runs are billed
On pay-as-you-go, each run is billed per second while it runs, at the app’s size. Nothing is billed between runs.Do it from your tools
$APP_ID is the app’s ID from List app services or raff apps list. $RAFF_API_KEY is an API key.
To create one with the API, send service_type cron (with cron_schedule) or job to Create app service.
API: Trigger a manual job run, List job runs, Cancel a job run
Next steps
View logs, metrics and a shell
Read the output of each run.
Pause and resume an app
Stop a schedule for a while.