Deploying Webjob using ARM Template in Azure

There are couple of methods to deploy webjob using ARM Template but here I will try to explain how do we deploy webjob using ARM template so that all the process is automatic and no manual steps needs to be done.
The Idea is when we deploy any app service for staging/production, we provide the zip file link which contains all the necessary code to deploy the webapp/webjob.
In the process of deployment that zip file is extracted automatically to the path site\wwwroot\
Also can be seen from the screenshot below: (go to the app service-> console(development tools))


For the webapp to be run as background webjob we need to put all the contents site\wwwroot\app_data\jobs\continuous\Name\
so create all the folders using mkdir/md and put all the contents of the files inside.

Now instead of manually creating the the directory , we need to automate the process so we can create the folder app_data then inside folder jobs then continuous then Name and put all contents inside Name folder , then compress the app_data folder to create the zip.

Finally give the app_data zip link in the deployment files ,so when the data will be compressed webjob will be automatically be created and running .
If you want to see the contents we can go to the console and check the content.

Happy deployment 🙂