How to stop an Azure Function with CRON schedule "0 0 1 * *" from executing every 1.5 hours
I have a timer-triggered Azure Function with the schedule "0 0 1 * *" which translates to running once every day at 00:01. However, the function is triggered many times per day at a seemingly constant interval of 1.5 hours. Looking at its logs in App Insights, I see that the reason reads as "isPastDue" which means that previous scheduled occasions were missed and now it runs this function for those missed dates. However, the function hasn't been disabled at all. Maybe the issue has something to do with the way I deploy it which results in the info message below being displayed on various tabs:
Your app is currently in read only mode because you are running from a package file. To make any changes update the content in your zip file and WEBSITE_RUN_FROM_PACKAGE app setting.
The problem is that every new trigger interrupts the currently running execution of the function and makes it start from scratch, doing the same work until the next trigger comes.
The questions I'd like to ask your help for are:
- what could be the reasons for having "isPastDue" although the function hadn't been disabled
- how to stop the function from firing due to this reason