Skip to main content

Scheduled Deployments

With Replit's scheduled Deployments, you can effortlessly configure and manage recurring tasks without the hassle of dealing with machine configurations. You'll have access to a user-friendly interface that simplifies setting up scheduled jobs, allowing you to focus on your tasks. This guide helps you understand scheduled Deployments and walks you through the steps to schedule your application Deployment.

To access Scheduled Deployments in your Repl workspace, select + in any window and search for Deployments or select the Deploy button in the header. You'll see Scheduled Deployments along with other Deployments.

Specifications

  • You can enter the Schedule, select the timezone from the dropdown, and see that the cron expression is automatically updated.
  • If you enter the cron expression and select the timezone from the dropdown, the schedule will update automatically.
  • Each Deployment includes a view of logs per job execution, allowing you to track the status and details of each execution.
  • You are provided $25 in monthly credits included in your Replit Core membership for scheduled job executions.
  • Scheduled Deployments utilize a single machine type with a fixed timeout duration, simplifying the Deployment process.
  • You can shut off or cancel scheduled jobs as needed.
  • Currently, we have a default timeout set at 11 hours for scheduled Deployment executions, after which they will exit.
  • Regarding concurrency, scheduled Deployment executions can run simultaneously without upper bounds or limits.
  • Scheduled Deployments have a minimum granularity of 1 minute for execution. This means you cannot schedule a job to run more than 1 time per minute.

Set up your Deployment

This section walks you through the steps to configure your scheduled job.

  • Examples:
    • "Every Monday at 10 AM"
    • "March 24th, 2024 at 3 PM"
    • "Every day at 2 PM"
    • "Every weekday at 8 AM"
    • "Every Friday at 6 PM"
    • "Every 15th of the month at 7 AM"

Cron expression

Cron expressions are strings that define a job's schedule, specifying times, dates, or patterns. They consist of five mandatory fields and one optional field, representing different time units.

  • Fields:

    • Minute, Hour, Day, Month, Day of Week
  • Example Cron expressions:

    • "At 9:30 a.m. on the 15th day of every month" - 30 9 15 * *
    • "Once every 5 minutes" - */5 * * * *
    • "Every day at midnight" - 0 0 * * *
    • "At 8 PM every Sunday" - 0 20 * * 0
    • "Every hour on weekdays" - 0 * * * 1-5

Timezone selection

Select your timezone from the dropdown menu to ensure that your scheduled Deployment runs at the right time for you.

Build command

Include a build command to compile your app before running it. For example, you might use npm run build to compile your JavaScript project.

  • Examples:
    • For a Node.js project: npm install
    • For a Python project: pip install -r requirements.txt
    • For a React app: npm run build

Run command

Your project already has the default build command, but you can change it if necessary. The following are some examples of the run commands.

  • Examples:
    • For a Node.js project: node index.js
    • For a Python project: python app.py
    • For a React app: npm start

Deployment secrets

Deployment secrets allow you to add sensitive information your app needs for security. These secrets are encrypted and securely stored, ensuring your data remains protected. You can add secrets by providing a name and value for each secret. Your app can then access these secrets during Deployment, allowing you to securely store API keys, database passwords, or any other sensitive information your app requires. For more information, refer to the Secrets guide.

Pricing details

Scheduled Deployments have three cost levers:

  • Per-second machine cost: The primary cost involves the per-second utilization of the machine. The default machine costs $0.000028/sec. You are only billed when the job is actively running.
  • Scheduler cost: The cost of the scheduler is $0.10 per month, per Scheduled Deployment.
  • Outbound data transfer cost: The outbound data transfer across all Replit products costs $0.10/GiB.

If you are a Replit Core member, your membership comes with $25 per month in monthly credits that can be applied towards Scheduled Deployments. To learn more, visit our pricing page about each plan's features.

Once you've set up your schedule, commands, and secrets, select Deploy to start your scheduled Deployment. To monitor your Deployment, refer to the Monitoring a Deployment page.

Was this helpful?