> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduled Deployments

> Learn how to run tasks on a schedule with Scheduled Deployments.

Define a command-line operation and a schedule, and Replit runs it automatically
in your Replit App's environment. After completion, the operation terminates until the
next scheduled run.

Scheduled deployments, also known as scheduled jobs, work best for handling periodic tasks
such as checking status, sending notifications, and starting backups. They are not designed
for continuous or long-running tasks such as web applications.

<Frame>
  <img src="https://mintcdn.com/replit/jSmYU1wBTvl8UMyc/images/deployments/scheduled/scheduled-deployments.jpg?fit=max&auto=format&n=jSmYU1wBTvl8UMyc&q=85&s=bbc6ef88e692b2fbe28b42f205b3b665" alt="Scheduled Deployments" width="1920" height="1080" data-path="images/deployments/scheduled/scheduled-deployments.jpg" />
</Frame>

## Features

Scheduled deployments include the following features:

* **Automatic scheduling**: Schedule your task, and Replit runs it automatically.
* **Natural language scheduling**: Enter a human-readable description of the schedule, and AI converts it into a cron expression, a computer-readable schedule format.
* **Error alerts**: Receive notifications when your scheduled task fails.
* **Monitoring**: View logs and monitor your scheduled deployment's status.

## Usage

You can access scheduled deployments in the Publishing Project Editor tool.

The following sections guide you through setting up and managing your scheduled deployments.

<Accordion title="How to access Scheduled Deployments">
  From the left **Tool dock**:

  1. Select <img class="icon-svg" src="https://mintcdn.com/replit/X_IP1EeHGm0cA2VA/images/icons/workspace-all-tools-button.svg?fit=max&auto=format&n=X_IP1EeHGm0cA2VA&q=85&s=579643854fb13c402de516695e52c554" alt="All tools icon" width="16" height="16" data-path="images/icons/workspace-all-tools-button.svg" /> **All tools** to see a list of Project Editor tools.
  2. Select <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/deploy-icon.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=853c5ef39a8a7ac3648b3a2ce182fcb8" alt="Publishing icon" width="16" height="16" data-path="images/icons/deploy-icon.svg" /> **Publishing**.
  3. Select the **Scheduled** option and then select **Set up your published app**.

  From the **Search bar**:

  1. Select the <img class="icon-svg" src="https://mintcdn.com/replit/X_IP1EeHGm0cA2VA/images/icons/workspace-search-icon.svg?fit=max&auto=format&n=X_IP1EeHGm0cA2VA&q=85&s=d3feed840da2d19e1ee4873d137114dc" alt="magnifying glass icon" width="16" height="16" data-path="images/icons/workspace-search-icon.svg" /> magnifying glass at the top to open the search tool
  2. Type "Publishing" to locate the tool and select it from the results.
  3. Select the **Scheduled** option and then select **Set up your published app**.
</Accordion>

<Frame caption="Scheduled Job configuration screen in the Publishing tool">
  <img src="https://mintcdn.com/replit/jSmYU1wBTvl8UMyc/images/deployments/scheduled/scheduled-deployment-options.png?fit=max&auto=format&n=jSmYU1wBTvl8UMyc&q=85&s=2a2c4a5e202f767336eae9fba99b5363" alt="Scheduled Deployment options" width="4052" height="2040" data-path="images/deployments/scheduled/scheduled-deployment-options.png" />
</Frame>

### Machine configuration

This field lets you view the machine's CPU, RAM, and usage cost for your scheduled deployment.

### Schedule fields

* **Schedule description**: Enter a natural language description of the schedule, such as "Every Monday and Wednesday at 10 AM" or "March 24th, 2024 at 3 PM."
* **Cron expression**: Optionally, enter a computer-readable string that defines when the task should run.
* **Timezone selection**: Select the timezone for the schedule from the dropdown menu.

When you enter a value in the **Schedule description** or **Cron expression** field, AI translates it automatically to match.
To learn more about cron expressions, see the <a href="https://en.wikipedia.org/wiki/Cron" target="_blank">cron</a> Wikipedia page.

### Job timeout

Enter the maximum amount of time the job can run before the scheduler terminates it. Select either "minutes" or "hours from the time unit dropdown.

<Tip>
  Scheduled jobs may run slower than in the Project Editor. Test the
  deployment and adjust the timeout accordingly.
</Tip>

### Build command

Enter the shell command that compiles or sets up your app before running the Run command in the **Build command** field.
For example, to install your Node.js app dependencies, you might add the `npm install` build command.

The build command time does not count toward your usage and is not counted against the job timeout.

### Run command

Enter the shell command that launches your task in the **Run command** field.
For example, to run a Python script, you might add `python app.py` as the run command.

The Replit scheduler executes the run command at the scheduled times.
The time it takes to run the command counts toward your usage. For more information on usage billing,
see the [Scheduled Deployments section](/billing/deployment-pricing#scheduled-deployments) in our pricing documentation.

### Deployment secrets

Select **Add deployment secret** to add environment variables or secrets your app needs to run securely.

If your Replit App has environment variables or secrets, the Publishing tool adds them to the list automatically.

To edit the values of an environment variable select the

<img class="icon-svg" src="https://mintcdn.com/replit/X_IP1EeHGm0cA2VA/images/icons/vertical-dots.svg?fit=max&auto=format&n=X_IP1EeHGm0cA2VA&q=85&s=7b4b6a9992b3b20202297b60b6ef416d" width="16" height="16" alt="three vertical dots icon" data-path="images/icons/vertical-dots.svg" /> vertical dots and choose **Edit** from the menu. The Secrets manager only applies
value to the deployment and does not change environment variables defined in your
Replit App.

## Next steps

To learn more about deployments, see the following resources:

* [Published App Monitoring](/cloud-services/deployments/monitoring-a-deployment): Learn how to view logs and monitor your published app.
* [Publishing costs](/billing/deployment-pricing): View the costs associated with publishing.
* [Pricing](https://replit.com/pricing): View the pricing and allowances for each plan type.
* [Usage Allowances](/billing/about-usage-based-billing): Learn about scheduled deployment usage limits and billing units.
* [Create a HackerNews Slack bot](https://docs.replit.com/getting-started/quickstarts/webscrape-and-slack-notifications): Learn how to create a Slack bot that checks a website for new content and sends you notifications on a schedule.
