Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
373 views
in Technique[技术] by (71.8m points)

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.

question from:https://stackoverflow.com/questions/65557546/running-a-windows-task-scheduler-job-on-azure-webjob-scheduled-event

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...