user576510
user576510

Reputation: 5915

Azure Function CLI irregular trigger timing and wrong details

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

Upvotes: 0

Views: 133

Answers (2)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35154

* */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.

Upvotes: 0

Vova Bilyachat
Vova Bilyachat

Reputation: 19514

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

Upvotes: 1

Related Questions