0

I m testing Azure function locally using cli.

I have noticed 2 issues:

  1. Sometimes CLI do not shows correct time when function will be executing. For example I have cron to execute function every two mins but it shows function will be executed after a difference of seconds ? weird.

  2. Often it do not starts execution as per time shown in CLI, few times it took much time and then respond.

Is is normal ? Please guide how I can fix these. enter image description here

enter image description here

user576510
  • 5,777
  • 20
  • 81
  • 144

2 Answers2

1

try [TimerTrigger("0 */2 * * * *")] see examples here

Vova Bilyachat
  • 18,765
  • 4
  • 55
  • 80
0

* */2 * * * * cron expression means that you want to execute it every second (the first *) of every 2nd minute, so

2:50:00
2:50:01
2:50:02
...
2:50:59
2:52:00
2:52:01
etc

The correct expression is 0 */2 * * * *: execute every 2nd minute when seconds are 0, which should give

2:50:00
2:52:00

Please check if you still have delays after this change, and it so, post it as a new question with exact description of the problem.

Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107