---
title: WebJobs in DXP environments
slug: dxp/cms12-docs/webjobs-in-dxp-environments
docTags: 
createdAt: 2026-06-01T17:39:50.094Z
---

:::hint{type="info"}
**Note**
This feature is for DXP for CMS 11 and Commerce (PaaS) 13 and *not* supported with DXP for CMS 12 and Commerce (PaaS) 14.
:::

A WebJob is a feature of Azure App Service that lets you run arbitrary programs or scripts using the same App Service Plan resources as a Web App. With some functional limitations, you can run any script or console application with WebJobs on a Windows computer.

To run a WebJob, you need an existing Azure App Service Web App. A single App Service plan can support multiple WebJobs.

:::hint{type="info"}
**Note**
In DXP environments, the deployment flow only supports the **Continuous** WebJob type.
:::

A continuous WebJob starts when you deploy it and continues to run in an endless loop. For example, you can use this kind of WebJob to poll a message for new items and process their contents. Because the WebJob is continuous, your process can start after the message displays.

## Create a WebJob project using Visual Studio

To create a WebJob that is deployed alongside an App Service Web App, use the WebJobs project template. Add this template to an existing Web App project by clicking the name of the Web App project. Click **Add** and then click **New Azure WebJob Project**.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/x5FnozqxUeY6uP9JzcdGW_9ceb607-imageko6u.png)

A dialog box will display to give you options to create WebJob.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/jOF3FUPyFbGmnHDVuEQhH-20260826-135105.png)

The created project is a console application; it includes a `Program.cs` file, which contains a `Main()` method that is the entry point for the application. In the `Main()` method, the application initiates and configures a `JobHost` object, which is the object that communicates with Azure when the WebJob is deployed. You can place connection strings in `App.config` and implement the logic that is executed in `Functions.cs` file.

The project template also creates a `webjobs-list.json` file in the Web App project:

```csharp
{
  "$schema": "http://schemastore.org/schemas/json/webjobs-list.json",
  "WebJobs": [{
    "filePath": "../WebJobExample/WebJobExample.csproj"
  }]
}
```

The `filePath` points to the WebJob project, where it also has an auto-generated JSON file called `webjob-publish-settings.json`.

```csharp
{
  "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
  "webJobName": "WebJobExample",
  "runMode": "Continuous"
}
```

In the file, `runMode` is specified as **Continuous**.

After deploying the site to the DXP environment, the WebJob is located at `wwwroot\app\_data\jobs\continuous`.

:::hint{type="info"}
**Note**
An incorrect path causes the job to not work as expected.
:::

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/PP73kzSLj0pVG2ZTEI85V_a8b5616-imageofa7.png)

See also blog post: [Add WebJob to a CMS Web App](/epiui/CMS/Content/blogs/bien-le/dates/2020/8/adding-web-job-to-an-existing-cms-web-app,,226830/?epieditmode=False) - Bien Le
