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

Pedro 1 Reputation point
2021-11-18T16:37:30.347+00:00

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 ?

thanks!!

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

1 answer

Sort by: Oldest
  1. Grmacjon-MSFT 9,501 Reputation points
    2021-11-18T23:34:25.063+00:00

    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.

    Thanks,
    Grace

    ------------------------------------------------------------------------------------------------------------------------------

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

    1 person found this answer helpful.