Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't create WebJob in Azure portal

I'm struggling to create a WebJob in the Azure portal, all I'm getting is a 'Failed to add web job' error, no other details.

I have already created a web job before with no issues but can't create a second one in the same App Service or in a different one. Have tried different names but no luck. I'm on the Basic App Service plan and as far as I know there is no limitation on a single web job.

Did anyone have this issue ?

like image 865
SzilardD Avatar asked Jan 26 '26 07:01

SzilardD


1 Answers

I recently encountered this error too, and to solve it I basically had to deploy the web job manually from a zip file. I Originally found out how to do this from an old azure promo video that I now can't find, so just for the next poor soul that has to do this I have included them here.

  1. Build the project. Note that if you have converted to .Net Standard and the VS 2017 style you will need to build the project as a console app rather than a class library.
  2. Go to the bin folder and zip up the contents of the release folder. Note that the exe needs to be at the root of this zip or it won't work.
  3. In the Azure portal go to the App Service -> Web Jobs and click on Add.
  4. Give the Web job a name and select the zip file you just created.
  5. For continuous web jobs just click create.
  6. For Scheduled web jobs you will need to provide a CRON expression. Something like 0 0 5 * * * for every day at 05:00.

The web job should now be deployed.

like image 114
AlexW-3891 Avatar answered Jan 28 '26 21:01

AlexW-3891



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!