0
votes

I need to develop a process (e.g. Azure fucntion app) that will load a file from FTP once every week, and perform ETL and update to other service for a long time (100mins).

My question is that will Timer Trigger Azure Function app with COMSUMPTION plan works in this scenario, given that the max running time of Azure function app is 10 mins.

Update

My theory of using Timer trigger function with Comumption plan is that if the timer is set to wake up every 4 mins from certain period (e.g. 5am - 10am Monday only), and within the function, a status tells whether or not an existing processing is in progress. If it is, the process continues its on-going job, otherwise, the function exits.

Is it doable or any flaw?

2

2 Answers

0
votes

I'm not sure what is your exact scenario, but I would consider one of the following options:

Option 1

Use durable functions. (Here is a C# example)

It will allow you to start your process and while you wait for different tasks to complete, your function won't actually be running.


Option2

In case durable functions doesn't suit your needs, you can try to use a combination of a timer triggered function and ACI with your logic.

In a nutshell, your flow should looks something like this:

  1. Timer function is triggered
  2. Call an API to create the ACI
  3. End of timer function.
  4. The service in the ACI starts his job
  5. After the service is done, it calls an API to remove it's own ACI.

But in anyway, durable functions usually do the trick. Let me know if something is unclear. Good luck. :)

0
votes

With Consumptions plan, the azure function can run for max 10 minutes, still, you need to configure in host.json

You can go for the App Service Plan which has no time limit. Again you need to configure function timeout property in host.json

for more seed the following tutorial https://sps-cloud-architect.blogspot.com/2019/12/azure-data-load-etl-process-using-azure.html