> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Schedule Recurring Jobs

## Article: Schedule Recurring Jobs

## Article Link: https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/recurring-jobs/schedule-recurring-jobs.md

## Article Content:

# Schedule Recurring Jobs

You can schedule [recurring jobs](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/recurring-jobs/about-scheduling-recurring-jobs.md) to run on any backend function at specified intervals.

To schedule recurring jobs on your site:
## Step 1 | Add a backend function
Add an exported function to the backend that you want to run with a scheduled job. The function can be in any backend `.js`, `.web.js`, or `.jsw`  file.

## Step 2 | Add the jobs.config file in the backend

The way that you add the `jobs.config` file depends on which IDE you're using.

To add the `jobs.config` file:

### Editor
1. Go to the **Public & Backend** section of the code panel. 
2. Hover over **Backend**, click the plus icon ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/0ca9e8ba-16ed-4cd8-a1e1-58d01c4420f7/2021/10/13/04083fa4-3262-4606-98d1-cbc359bf8585/1a26226e-c281-42d2-8a60-88e44fe40c61.png), and select **Add scheduled jobs**. 

A `jobs.config` file opens in the code editor. The file includes a sample JSON object for defining scheduled jobs.

### Wix IDE or your local IDE
1. Add a `jobs.config` file to the `src/backend` folder. 
2. Copy the [sample JSON object](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/recurring-jobs/jobs-json-object.md#jobs-json-object) and paste it into the file.

## Step 3 | Edit the JSON object to define the scheduled job

The `jobs.config` file contains a JSON object which defines all the scheduled jobs for your site. Each object in the `jobs` array contains the following properties:
+ `functionLocation` 
+ `functionName` 
+ `description` (optional)
+ `executionConfig` 

Use the [jobs JSON object reference](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/recurring-jobs/jobs-json-object.md) for additional details on each property. 

<blockquote class="tip">
<strong>Tip:</strong>
To simplify the process of building your <code>jobs.config</code> file, you can use this third-party <a href="fallback::https://shoonia.github.io/jobs.config/">Jobs Config</a> tool. It allows you to enter the details of your jobs and builds the jobs object for you. The tool also includes a validator that can check your existing <code>jobs.config</code> file for errors.

</blockquote>

Here is an example of a JSON object configured to send a status report every Monday morning at 8:00 AM UTC time:
```json
{
  "jobs": [
    {
      "functionLocation": "/utils.web.js",
      "functionName": "sendStatusReport",
      "description": "Send a weekly status report.",
      "executionConfig": {
        "time": "08:00",
        "dayOfWeek": "Monday"
      }
    }
  ]
}
```

### Schedule multiple jobs
Schedule multiple jobs in the `jobs.config` file by adding additional objects to the `jobs` array.
```json
{
  "jobs": [
    {
      "functionLocation": "/utils.js", 
      "functionName": "sendStatusReport",
      "description": "Send a morning status report.",
      "executionConfig": {
          "cronExpression": "0 8 * * MON"
      }
    },  
    {
      "functionLocation": "/utils.js",
      "functionName": "cleanDb",
      "description": "Delete stale items from the DB on the first of the month.",
      "executionConfig": {
          "time": "01:00",
          "dateInMonth": 1
      }
    }
  ]
}
```

## Step 4 | Publish your site
You must [publish your site](https://support.wix.com/en/article/wix-editor-publishing-your-site) to save changes to your scheduled jobs.

## See also
+ [About scheduling recurring jobs](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/recurring-jobs/about-scheduling-recurring-jobs.md)
+ [Jobs: JSON object](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/recurring-jobs/jobs-json-object.md)