Akshay Jain
Akshay Jain

Reputation: 101

Running an azure cloud service after every n days

I have created an azure service which is responsible for below task: (1) Access the blob containers and download the files from there. (2) Extract some data from downloaded files (3) Stored the extracted data to an Azure SQL Server

I want to run this processing after every 7 days. Is there a way to achieve this? or can I use any other option than cloud service to achieve the above goal?

Upvotes: 0

Views: 69

Answers (2)

juvchan
juvchan

Reputation: 6245

I would recommend you to use Azure Function as its Timer-based processing (Timer trigger) feature is able to fulfill your requirements.

Timer triggers call functions based on a schedule, one time or recurring.

Reference: Azure Functions timer trigger, Azure Functions Pricing

Another great advantage of using Azure Function for your scenario is its pricing model.

Azure Functions consumption plan is billed based on resource consumption and executions. Consumption plan pricing includes a monthly free grant of 1 million requests and 400,000 GB-s of resource consumption per month.

Upvotes: 2

4c74356b41
4c74356b41

Reputation: 72171

Certainly not natively with the Cloud Service itself. I mean, you can obviously code it so it performs some task(s) and sleeps for 7 days, but you will pay for all of that time, that makes no sense

You can use Azure WebJobs, Functions and Scheduler for this purpose, or you can create a PowerShell\Cli or something else cron task\task scheduler to turn on your Azure Cloud Service, wait for it to finish processing and turn it off. But that seems like a lot of extra effort, I'd rather go with Scheduler or Functions.

Upvotes: 0

Related Questions