Function App with two different scheduels

Sumeetha Mogasati 126 Reputation points
2022-05-18T13:14:38.833+00:00

Hi,

A function app has been implemented with a schedule to execute at the configured time, and it is working as expected.
A new functionality needs to be implemented to run at a different schedule (not the one mentioned above).

Would it be possible to have two separate operations (such as below) with two different schedules in the same Function App, or do the above requirements demand another separate Function App?

[FunctionName("myFunction")]

# Operation 1
        public async Task RunAsync([TimerTrigger("05 03 0 * * 6")]TimerInfo myTimer, ILogger log)
        {
}
#Operation 2 - Different functionality
       public async Task RunAsync([TimerTrigger("0 03 0 * * 1")]TimerInfo myTimer, ILogger log)
 
        

Please help.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,261 questions
0 comments No comments
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 18,191 Reputation points Microsoft Employee
    2022-05-19T12:14:31.92+00:00

    @Sumeetha Mogasati Thanks for reaching out. Every timer trigger function runs on the CORN Expression that you have defined in function.json file. you cannot create two separate operations or passing two different CORN expressions to a single timer trigger function inside the functions app. Instead, you can create two timer trigger functions with two different CORN expressions within a single functions app.

    Feel free to reach back to me if you have any further queries.

    0 comments No comments

0 additional answers

Sort by: Most helpful