Hi Dafydd Owen,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
I understand you're experiencing issues with your Azure Function not triggering on the 1st and 15th of each month using the cron expression "15 0 1,15 * *"
. It's great to hear that it runs as expected locally. This behavior might be due to how Azure Functions handle time zones.
By default, Azure Functions use UTC (Coordinated Universal Time) for scheduling cron triggers. This means the function will execute based on UTC, not your local time zone. If you're working in a different time zone, it’s important to account for this difference when setting the trigger.
For Example, for IST (Indian Standard Time) the Cron Expression for IST (UTC +5:30): Use 30 18 1,15 * *
to schedule the function to run at 12:00 AM IST on the 1st and 15th of the month.
Your expression "15 0 1,15 * *"
is correct in local because it translates to:
- Second:
15
(at 15 seconds past the minute) - Minute:
0
(at the top of the hour) - Hour:
0
(midnight) - Day-of-month:
1,15
(on the 1st and 15th of the month) - Month:
*
(every month) - Day-of-week:
*
(any day of the week) We can see the below link for the same which we can use ncrontab validator
https://ncrontab.swimburger.net/?expression=15+0+1,15++
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.