3

I have a short running container that does background processing (no ingress) that I have deployed to the Azure Container Apps service in Azure, my config is min replicas 0 (for when the container completes its work and exits) and max replicas 1 (i want only want one instance of my container running at any time).

I want to start my container once every hour, it generally runs for 3 mins and completes its task and closes.

Is there anyway with Azure Container Apps to schedule the start of my container? At the moment I have reverted to running my Azure DevOps pipeline on a schedule which calls the az containerapp update command, but it feels like the wrong way to go about this.

DriveBlind
  • 67
  • 9

2 Answers2

2

This concept is now supported (in preview) via Container App Jobs.

Specific to your ask, the container app job supports cron expressions at creation time, which would allow you to configure the schedule.

e.g.

az containerapp job create ... --trigger-type "Schedule" --cron-expression "0 */1 * * *"

jasper
  • 3,424
  • 1
  • 25
  • 46
1

There's no scheduling concept in Container Apps. Here are some ideas:

1-Enable Ingress and create a Function or a Logic App that runs on a schedule and "ping" the Container App to start the process.

2-Create a Logic App that runs on a schedule and creates a Container Instance every hour, wait for it to complete, and delete it.

CSharpRocks
  • 6,791
  • 1
  • 21
  • 27
  • Thanks, I had a look at option 2. It appears there are prebuilt adapters for Azure Container Instances but not one (yet) for Azure Container Apps, probably because it is still in preview. I guess I could get the logic app to run the az containerapp update command – DriveBlind Aug 03 '22 at 11:54
  • Have you found any solution for this problem now @DriveBlind ? – Serhat May 24 '23 at 07:56