question

SumeethaMogasati-9915 avatar image
0 Votes"
SumeethaMogasati-9915 asked VenkateshDodda-MSFT answered

Function App with two different scheduels

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VenkateshDodda-MSFT avatar image
0 Votes"
VenkateshDodda-MSFT answered

@SumeethaMogasati-9915 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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.