Overview
Web Jobs is a feature of Azure App Services that run a program or script in the same instance as a web app, API app, or mobile app. There is no additional cost to use Web Jobs.
Azure Enablement comes with the ability to run the existing schedule tasks (configured in Aptify Smart Client) on Azure Portal as a Web Job.
This document is divided in three parts:
Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Open the Zipped Folder Containing the code files. <<path and name of the file>>
Search for WebJobManualDeploy.exe.config and open the same in Note Pad or Note Pad ++
The tags “AzureWebJobDashboard“ and “AzureWebJobStorage“ both are to be configured with Storage Account Connection String.
Under the AppSettings tag, value for key=”frequency” will be any one of the following : all, once, daily, weekly, monthly, monthlyRelative. This is for the type of job which is needed to be scheduled on portal. For example , a code with frequency daily will only run the task which are of type daily in database. It is to be noted that this setting is case sensitive.
App Insights has been configured for these web jobs and logs can be found App Insight log file. But to enable the app insights, Instrumentation Key is required (Line 25 of the picture below). Refer to Configuring Serilog with Azure Application Insights.
To get instrumentation key for App Insights, log into Azure portal and select the service Application Insights.
Select the Application Insights for which you want to configure the logs.
Under the overview tab you will find the Instrumentation key.
The below keys are required by web job to log into the database:
UserDatabase = “Aptify”
EntitiesDatabase = “Aptify“
SqlLogin and Password are the credentials to log into the database.
Server = Managed instance Endpoint (See Point 10-12)
To get managed instance endpoint, log into the Azure portal and select Sql Managed Instances Service.
Select the instance to be connected with the web jobs.
Once you select the instance you will find Networking under Security and Endpoint on the right pane of screen as shown in screenshot below.
Once all the changes are done in config file, save and close it. Now Select all the code files and zip them, give the zipped file a meaning full name. After this we are done with the code file changes.
...