Member-only story

Unleash the power of automation by scheduling Supabase Edge Functions

Alain Iglesias
5 min readMay 2, 2023
Image created with Midjourney

Introduction

In my last article, we covered how to create a manage Supabase Edge Functions. Today I’ll be covering the process to create a cron job to automate the execution of our edge functions to run at whatever time we needed to run them.

Getting started

Supabase allows you to schedule edge functions using a built-in Cron service. This Cron service is based on the widely-used Unix/Linux Cron system and allows you to define scheduled tasks simply and flexibly.

To schedule an edge function with Cron, you first need to create a new Cron job using Supabase’s web-based management console. You can specify the exact schedule for your task using standard Cron syntax, which allows you to specify minute, hour, day, month, and weekday values.

For this, we can work with this very useful tool given by the Cronitor website, where you can play with the different combinations of timing and it will display a text telling you how your combination is going to be executed.

Activate Postgres functions

--

--

Alain Iglesias
Alain Iglesias

No responses yet