Update pg_cron.mdx

This commit is contained in:
Copple authored and GitHub committed 2024-04-05 10:21:59 +02:00
1 parent 2581f978eb
commit db785bb90d
1 file changed
+12
@@ -72,6 +72,18 @@ Reach out to [Supabase Support](https://supabase.com/support) if you're unsure i
## Examples
### Run a stored procedure every 5 seconds
You can use '[1-59] seconds' to schedule a job based on an interval:
```sql
select cron.schedule (
'website-latency', -- name of the cron job
'5 seconds',
'call ping_website()'
);
```
### Delete data every week
Delete old data on Saturday at 3:30am (GMT):