Quickstart
Job names are case sensitive and cannot be edited once created.
Attempting to create a second Job with the same name (and case) will overwrite the first Job.
Schedule a job
- Go to the Jobs section to schedule your first Job.
- Click on
Create job
button or navigate to the new Cron Job form here. - Name your Cron Job.
- Choose a schedule for your Job by inputting cron syntax (refer to the syntax chart in the form) or natural language.
- Input SQL snippet or select a Database function, HTTP request, or Supabase Edge Function.

You can input seconds for your Job schedule interval as long as you're on Postgres version 15.1.1.61 or later.
Edit a job
- Go to the Jobs section and find the Job you'd like to edit.
- Click on the three vertical dots menu on the right side of the Job and click
Edit cron job
. - Make your changes and then click
Save cron job
.

Activate/Deactivate a job
- Go to the Jobs section and find the Job you'd like to unschedule.
- Toggle the
Active
/Inactive
switch next to Job name.

Unschedule a job
- Go to the Jobs section and find the Job you'd like to delete.
- Click on the three vertical dots menu on the right side of the Job and click
Delete cron job
. - Confirm deletion by entering the Job name.

Inspecting job runs
- Go to the Jobs section and find the Job you want to see the runs of.
- Click on the
History
button next to the Job name.

Examples
Delete data every week
Delete old data every Saturday at 3:30AM (GMT):
Run a vacuum every day
Vacuum every day at 3:00AM (GMT):
Call a database function every 5 minutes
Create a hello_world()
database function and then call it every 5 minutes:
Call a database stored procedure
To use a stored procedure, you can call it like this:
Invoke Supabase Edge Function every 30 seconds
Make a POST request to a Supabase Edge Function every 30 seconds:
This requires the pg_net
extension to be enabled.
Caution: Scheduling system maintenance
Be extremely careful when setting up Jobs for system maintenance tasks as they can have unintended consequences.
For instance, scheduling a command to terminate idle connections with pg_terminate_backend(pid)
can disrupt critical background processes like nightly backups. Often, there is an existing Postgres setting, such as idle_session_timeout
, that can perform these common maintenance tasks without the risk.
Reach out to Supabase Support if you're unsure if that applies to your use case.