I have a c# webjob that has two functions. One is a blobtrigger, the other is TimerTrigger("0 */2 * * * *").
I published the webjob (via visual studio) to each of the appservices (all in the same resource group using the same blobstorage.)
I expected that each one of these would "trigger" every 2 minutes. Instead what is happening is only one of my webjobs will run for the day, the rest of the appservices go without a webjob run for the whole day.
In the azure-webjobs-host timer log there is only this one line:
{"Last":"2020-01-31T20:00:00.0030602+00:00","Next":"2020-01-31T20:02:00+00:00","LastUpdated":"2020-01-31T20:00:00.0030602+00:00"}
Any idea on why the webjob isn't running in the other appservices?
2 issues:
Having multiple blob triggers meant anyone of the app services could service it. I really only need one blobtrigger per container.
The triggered function was not run and block, so blob.ExistsAsync
would take to long to return. So I made the Job async Task
, use JobHost.CallAsync
and then Wait()
;