Azure - Dynamically get a schedule from database and trigger multiple methods to do different tasks in azure?

Viewed 915

What is the best way of using Azure technology (azure function apps, durable function app, azure web jobs, ?) to get a schedule from a database depending on the specific task that needs to be performed.

The schedule that would be read from the database, would then be converted to a CRON expression. I have hourly, daily, and weekly triggers to run specific tasks.

The schedule within the database could possibly change, hence why it would need to be dynamic.

I could create individual specific function apps (over 20) but wanting it to be more flexible and dynamic.

How would i go about this? what azure tech would i use?

Thanks

1 Answers

Two options I can think of, depending on the details of what you're after:

  1. Use timer-triggered Azure Functions with the %appsetting% format for the timer expression. Then have a separate function that's timed to run regularly or triggered when the schedules update, get the current schedule and update the function app settings with any changes to the CRON expressions (using a managed identity that gives it the necessary permissions).

  2. If you're just running on the hour/day/week, you could have a function that runs every hour, reads the current schedule and triggers any functions that are scheduled for that time (basically your own simple timer).

Related