Re-visiting Azure Search, WebJobs and Scheduler

I've written previously about these items:

Since those articles were published, the WebJobs (App Service) service has changed causing the solution I documented to stop working. I was using the Scheduler to invoke the WebJob via the "Kudu" engine. The change -- the Kudu WebJob API no longer allows anonymous calls. And the Scheduler Job Collection on the Free Tier cannot make authenticated calls.

The alternatives: upgrade the App Service to a Basic Tier plan and change the Function to have a Timer Trigger, or upgrade the Scheduler Job Collection to a Standard Tier plan. I chose to leave the code un-changed and updated the Scheduler Job Collection. This allows me to add Authentication options (#1) and an Error action (#2) to my scheduled action.

Figure A

In the Authentication Settings blade, I entered the Deployment Credentials of the App Service. You can find those on the App Service blade or in the .publishsettings file for the web site.

I'm using the Error action to post an Actionable Message to an Office 365 Group using the Incoming Webhook Connector. I'll write up more about that in a future post.

I now have a WebJob that updates my search index for this website that includes a notification when things go wrong. I am quite happy with this setup. I hope you find the information helpful.