On this repository, you will have an .Net Core 2.0 App Console using Dependency Injection and Application Insights. This App Console will be compatible to Azure WebJobs.
To make an App Console compatible to Azure Webjobs, you need to add 2 files:
- run.cmd, with .Net Core, the console app won't generate a .exe on publish, as it was with the traditional .Net Console app, but a dll, so you need to create the command file and add the following code:
@echo off
dotnet {NAMEOFYOURDLL}.dll
- settings.job (optional), this file will specify to Azure which periodicity you want, in my case, every 5 min will be:
"schedule": "0 0/5 * * * *"
Publish your App Console to a local folder, bin\Release\PublishOutput by default, then zip the PublishOutput folder.
Nothing different than a classic Web, enter a name and the select the options you need, then create.
Enter a name, select the Zip file, select triggered, let triggers to manual, this option will overwritten if you have set a settings.job file,