0

I am facing this problem: I created Azure Function in Python which will trigger on 12th hour of every day. But the problem is that whenever I open this function in portal.azure.com my function triggers and execute (regardless of scheduled time). I have added this in my function.json file but still facing this problem:

{
"scriptFile": "__init__.py",
"bindings": 
[{
"name": "mytimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 1 13 * * *",
"RunOnStartup": false,
}]}
  • Show the function invocation logs if the function is running regardless of specified timer trigger schedule. –  Dec 06 '22 at 17:00
  • Check the Schedule value once: https://i.imgur.com/Ktny0mZ.png - For Triggering every 12 hours and https://i.imgur.com/883IQBi.png - For Trigger at 12 on every day –  Dec 07 '22 at 12:46

1 Answers1

0

What does the logs say when you start the function? Usually the logs prints the next 5 runs for the fucntion.

0 1 13 * * * should be at the first minute past 1pm how about 0 0 2/12 * * * 2/12 is every 12th hour between 2am and 11pm

{second} {minute} {hour} {day} {month} {day of the week}

As far as i read the cheat sheet here, it could be why it runs every second

Peter
  • 104
  • 1
  • 6
  • `* 1 13 * * *` => `Every second, at 1 minutes past the hour, between 01:00 PM and 01:59 PM`? – jikuja Dec 07 '22 at 00:11
  • @jikuja yes you are right - my answer would trigger that... My fault. Updated the answer – Peter Dec 07 '22 at 06:09