Unable to modify cron.timezone parameter in azure flexible postgresql

Mani Mahesh S 56 Reputation points
2024-10-21T11:09:19.8433333+00:00

Hi,

We are having 100s of scheduled jobs in pg_cron which is supposed to run in CET time zone. Since default timezone of pg_cron is UTC, we are adjusting each schedule as per UTC and scheduled it. As Day light savings demands to change the schedule 2 times an year, we are forced to change it for 2 times in year manually. As a solution, we found recent version of pg_cron supports cron.timezone parameter and tried to change it. But we are facing permission denied issue even is elevated access. This parameter is not available in server parameters as well. Kindly help when we can expect this parameter as dynamic in Azure PostgreSQL flexible server.

Thanks and regards,

Manimahesh S

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Mahesh Kurva 5,025 Reputation points Microsoft External Staff Moderator
    2024-10-21T13:41:38.3066667+00:00

    Hi @Mani Mahesh Sivakumar,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are facing issues with the cron.timezone parameter in pg_cron on Azure PostgreSQL flexible server. I'm sorry to hear that you are facing this issue.

    As of now, the cron.timezone parameter is not available as a dynamic parameter in Azure PostgreSQL flexible server.

    However, you can set the timezone parameter in your PostgreSQL configuration file (postgresql.conf) to the desired time zone. This will set the default time zone for all connections to the database.

    User's image For more Information, please refer the document: https://github.com/citusdata/pg_cron

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.