Hello @Gagandeep Singh - Thanks for confirming in the comments. The retry policy for Time Triggers is a GA feature, and it can be configured in the v4 programming model of NodeJS. Based on the TimerFunctionOptions
type, which is found here, you can pass in RetryOptions
object (describing the retry policy) to retry
as follows:
const { app } = require('@azure/functions');
app.timer('timerTrigger', {
schedule: '0 */5 * * * *',
handler: (myTimer, context) => {
context.log('Timer function processed request.');
},
retry: {
strategy: 'fixedDelay',
maxRetryCount: 3,
delayInterval: 300
}
});
Config object for exponentialBackoffpolicy
can be found here: https://github.com/Azure/azure-functions-nodejs-library/blob/aa9068df56c2d4c2b90ee55dd42005e1d7c5cb4c/types/index.d.ts#L142
UPDATE 2/7/24:
If the function execution does not complete the schedule will not be updated so the timer will be seen as past due. The following note in the TimerTrigger doc is still valid in this case:
Please "Accept Answer" if the answer is helpful so that others in the community may benefit from your experience.