How to automate tasks in Azure Database for PostgreSQL server (Crontab seems not to work)

Pedro 1 Reputation point

Hello all,

I need to automate the following process in my Azure Database for PostgreSQL server, but it seems my Crontab isn't working (like I don't have permission). Does anyone already face something like this? What would be a good workaround?

I have created scripts that would be run by cron. The scripts/tasks that I need to get done Daily are:

(All this I have scripts that are working for, I just included to help with clarification of the situation)

  1. Drop the current DB
  2. Download the new DB dump
  3. Extract the DB dump file
  4. Build the DB

Any way to automatize tasks in the Azure Database for PostgreSQL server ?


Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,182 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,102 questions
Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 15,341 Reputation points

    Hi @Pedro

    Thanks for the question. I believe your scenario is possible using Azure Pipelines task for Azure Database for PostgreSQL Flexible Server. You can automatically deploy your database updates to Azure Database for PostgreSQL Flexible Server after every successful build with Azure Pipelines.

    Alternatively, you can use Azure automation or Azure functions to automate tasks.

    Hope that helps. Please let us know if you have further questions.



    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.