Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: pg cron audit query (#20779)

hallidayofbe983090b7a
diff --git a/apps/docs/pages/guides/database/extensions/pg_cron.mdx b/apps/docs/pages/guides/database/extensions/pg_cron.mdx
index 02c15a88180..486d11ae6aa 100644
--- a/apps/docs/pages/guides/database/extensions/pg_cron.mdx
+++ b/apps/docs/pages/guides/database/extensions/pg_cron.mdx
@@ -147,6 +147,24 @@ Unschedules a job called `'nightly-vacuum'`
select cron.unschedule('nightly-vacuum');
```
+### Viewing previously ran jobs
+
+View the last ten jobs that have ran
+
+```sql
+select
+ *
+from cron.job_run_details
+order by start_time desc
+limit 10;
+```
+
+<Admonition type="note">
+
+The records in cron.job_run_details are not cleaned automatically which will take up disk space in your datbabase.
+
+</Admonition>
+
## Resources
- [pg_cron GitHub Repository](https://github.com/citusdata/pg_cron)