citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.9k stars 195 forks source link

on Google Cloud Platform Cloud SQL pg_cron is not working on monthly and weekly schedule #325

Open paolocastle opened 6 months ago

paolocastle commented 6 months ago

I installed pg_cron extension (v.1.4 ) on GCP Cloud SQL PostgreSQL (v.14) .

I instaleld it on "postgres" database and it works smoothly on daily schedule

E.G.

SELECT cron.schedule('test cron OK', '21 18 * * *', 'VACUUM (FULL, VERBOSE) cron.job');
SELECT cron.schedule('test cron OK', '21 * * * *', 'VACUUM (FULL, VERBOSE) cron.job');

But when I schedule on monthly or weekly bases the job will not run (I can't find any attempt logged in cron.job_run_details or errors in database logs ) : E.G.

SELECT cron.schedule('test cron KO', '49 19 * * 4', 'VACUUM (FULL, VERBOSE) cron.job');
SELECT cron.schedule('test cron KO', '21 18 5 * *', 'VACUUM (FULL, VERBOSE) cron.job');

Do you have any idea what is the reason of this behaviour ?

Thank you,

Paolo