Linux Azure Web Jobs in .NET

Timo 0 Reputation points
2024-07-24T05:37:47.2266667+00:00

Hello,

I'd like to create .NET Web Jobs under my Linux Azure App Service but when I try to upload my Web Job files in the Azure portal I get an error: "Failed to add 'JobName'. There was an error creating your webjob."

From the documentation I read:

Note: WebJobs for Linux code is in preview. .sh scripts are supported. In addition to shell scripts, WebJobs written in the language of the selected runtime are also supported. Example: Python (.py) scripts if the main site is a Python code app.

I tried to uploading a published console app - does not work.

I tried creating a Web Job for a Windows App Service, then trying to import that into Azure App Service (not exe) - no luck, does not work.

Main questions but any help is much appreciated:

  • Do I understand correctly that if my App Service has a .NET web application running in it, I can then use .NET Web Jobs under that App Service?
  • How should I publish my .NET console app to be valid for an Azure Web Job in a Linux App Service? I tried using portable runtime, self-contained & framework dependent etc.

Many thanks,

T

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,628 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Achraf Ben Alaya 1,056 Reputation points MVP
    2024-08-01T06:31:25.95+00:00

    HI ,

    WebJobs for Windows container, Linux code, and Linux container is in preview.

    https://video2.skills-academy.com/en-us/azure/app-service/webjobs-create?wt.mc_id=MVP_328341

    I found this i hope its helpful : https://github.com/rsantosdev/app-service-linux-webjobs?tab=readme-ov-file

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.