why this cron expression is not working in my azure function app ?

Rushit Ajudiya 146 Reputation points
2022-06-12T06:01:04.777+00:00

I have created three timer trigger function apps with below cron expression for each function apps on 26th May 2022 and it was working perfectly.

1st cron expression --> 0 0 * * * * -------> run every hour like 1,2,3,4,...
2nd cron expression --> 0 45 */2 * * * --------> run every 2 hours like 0:45, 2:45, 4:45, 6:45, ...
3rd cron expression --> 0 30 */2 * * * --------> run every 2 hours like 0:30, 2:30, 4:30, 6:30, ...

now After 1st June 2022 whenever I am creating timer trigger function app with above mentioned cron expressions the 2nd and 3rd cron expressions are not triggering properly in Azure Functions.

So I have changed the cron expressions to 0 0 * * * * , 0 25 * * * * and it's triggering perfectly but whenever I am changing the cron expression with 0 45 */2 * * * and 0 30 */2 * * * My function app is not working/executing on specific given time interval.

so what can be the reason of these strange behavior of cron expression in Azure Function app?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,331 questions
Microsoft Sentinel
Microsoft Sentinel
A scalable, cloud-native solution for security information event management and security orchestration automated response. Previously known as Azure Sentinel.
1,205 questions
0 comments No comments
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 23,686 Reputation points Microsoft Employee
    2022-06-13T08:59:24.353+00:00

    @Rushit Ajudiya Thanks for reaching out. To test this i have created two timer trigger functions in my function app (running with .Net v6.0) using the same CORN expressions ( 0 45 */2 * * * and 0 30 */2 * * *) they are triggering accurately without any issues.

    Timer trigger firing might have failed due to the synchronization of triggers. If your function app is hosted on app service plan, then Always On should be enabled. If you are using consumption mode Function app should be woken up when a timer is due. For this to work, your triggers need to be 'synced', which normally happens automatically.

    You can refer to this documentation and try to sync your triggers. Additionally, you can refer to this documentation for more information on How to investigate with timer triggered functions not firing.

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

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.