Jun 7, 2018

Schedule Web Job with Azure Scheduler

In this example, I am using a console application since it’s easy to demonstrate. Below is the simple Console Application I am using.


Now publish the Console Application as a Azure Web Job.


Select Run on Demand as the run Mode.


Then select Microsoft Azure App Service as publish target.


Now select Subscription, Resource Group as View and existing App Service in next window.


Now validate the connection before publishing.


Now login to Azure (https://portal.azure.com/) subscription used to publish this app.
Now browse to App Service > Web Jobs where you will see the Web Job just published.


Here we able to Run and check the Logs, which will show the execution steps.


Here we see the text in log, we intended to write in our Console application.


Anyway, our plan is to schedule this execution. For that we need to go to Scheduler as below.


Once we press Create, resulting page requires a lot of details like Subscription, Job collection, Action Settings and Schedule data. One of the import detail is URL.


This is how you need to compile the URL;
Go to Properties of the Web Job and read these important parts and compile the URL as below format.


https://<B>:<C>@<A without "https://" part>

Once scheduler is enabled, you will see its recurring execution as expected.



No comments:

Post a Comment