Search code examples
azureazure-webjobswindows-task-schedulerazure-appservice

Running a windows task scheduler job on Azure webjob (scheduled event)


I have a question on windows task scheduler job running on Azure.

I already have a console app that is ought to run as a windows task scheduler job (5th day of every month). I was finding options to run it on Azure and found function app or webjob. Since I already have the console application, community suggests to go with Azure webjob and that webjob can be run on the existing app service.

I'm confused here, My current situation is, I do have a webapi running on Azure api app service.

  1. does it mean I can run it under the existing api app service? If yes, if the webjob (windows task scheduler job) takes more than 5 hours of time to finish its job, are webapi requests get blocked?

    I can bring the console app projects and web api projects to one roof (solution), so that I can build the solution and get the deployment packages using DevOps pipelines.

  2. How can I deploy to the webjob from the azure pipelines?

Kindly let me know if I'm heading in a wrong direction to attack the problem.


Solution

  • q1 - no, they run in different threads.
    q2 - there are many blogs online about that, you'd need to build\publish your artifacts and then use deploy Azure Web App task or write custom powershell code to do that