Currently pg_cron works as per UTC/ GMT time only. There is no configuration option available to run job as per local time server time. How to run pg_cron job as per local time?
Question posted in PostgreSQL
The official documentation can be found here.
The official documentation can be found here.
2
Answers
When you define cronjob with
pg_cron
you can set first the timezoneI had the same problem with pg_cron version 1.4.2.
I tried different combinations, setting the time zone in the config file, reinstalling the extension and reloading the database.
After upgrading to version 1.5.1 pg_cron_15-1.5.1-1.rhel7.x86_64, jobs run normally, according to the timezone set in the config file.