Cron do schedule but never execute
Hello,
The job are well scheduled but never executed.
I have followed this guide https://supabase.com/docs/guides/troubleshooting/pgcron-debugging-guide-n1KTaz but everything is fine regarding the cron scheduler.
job_run_details table remain empty.
On the SQL editor
13 Replies
Have you tried hard coding a cron time?
Also try the Cron UI to see if you can get any cron to run.
I have created a job from the UI, when I manually execute it by clicking the "Run command" button I got the toast success message but it never been executed. "Last run" column remain empty.


I would go back thru that guide again. Did you restart your instance?
Your cron code works fine on my system.

Restarting the instance did works ! Thank you @garyaustin
Now, I'm unable to say what is the root source of this issue and I'm a bit concern to have cron jobs silently not executing planned tasks. Does Supabase is able to captured the issue on clients instance ?
May I also ask why jobs schedule are not on UTC by default ?
If I provide a date UTC for exemple
2025-09-02 14:58:00+00 it will schedule the next run on 02 Sep 2025 16:58:00 (+0200). My database is deployed in France/Paris timezone UTC+2.
For exemple, I'm expecting the following to be scheduled at UTC time:
I thought Supabase servers where set to UTC and Cron by default uses UTC.
My crons run UTC time. It is 10:30 for me and 3:30 UTC/GMT

Not sure what you mean by capture issues on clients instance.
You have logs. Supabase can see those logs I assume, not sure if they have other logs or not.
When I ran your original code it ran 1 minute later.
For me, it set this at (+0200) in 2026 (meaning the date has passed which is not possible). So there is a missmatch of timezone between what I set as UTC in my SQL and what my instance get)

What are you showing there?
I'm showing the Cron UI of the
test_timezone job (above snippet)Ah. I don't use that. Let me see if it shows anything useful for me.
So that view seems to show your timezone.
But if you look at the cron schema run details it is in GMT/UTC.
Unless you changed it Supabase servers should be GMT and cron runs default to that time for their setting.
Hello ! So I've been trying to use cron job for a while now, and it seems that, if I don't restart the project time to time I endup having cron jobs not running at all. I'm unable to find the root source if the issue
Not sure I've seen anyone in that situation.
I would look to the repository https://github.com/citusdata/pg_cron and see if there are similar issues.
I'd make sure I was cleaning up my job_run_details table as described in the docs there also especially if running 5 minutes or less type tasks.
GitHub
GitHub - citusdata/pg_cron: Run periodic jobs in PostgreSQL
Run periodic jobs in PostgreSQL. Contribute to citusdata/pg_cron development by creating an account on GitHub.