Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • Documentation
    • WP Cloud API
    • FAQs
    • Partner Portal
    • New Partner Guide
    • Announcements
    • Changelog
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • API Documentation
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
      • Edge Cache preload
      • WooCommerce cart caching
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • Edge Rules overview
      • Edge Rule types
      • Edge Rule conditions
      • Verify Edge Rules
      • Edge Cache preload
      • WooCommerce cart caching
      • Edge Cache
    • Edge request logs
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
      • Edge request logs
    • Usage reporting
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Repair Yoast indexables
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning

Updates

  • Changelog
  • WP Cloud Status
  • Announcements
Documentation/WordPress on WP Cloud/Cron scheduling

Cron scheduling

LAST UPDATED

5 months ago

    WP Cloud provides platform cron for commands that need to run on a schedule. It runs independently of visits to the site and is separate from WordPress pseudo-cron, which checks for due WordPress events when the site receives a request.

    Choose a scheduling method

    Use the method that matches the work:

    MethodUse it for
    WordPress pseudo-cronEvents registered through the WordPress Cron API and managed by WordPress.
    WP Cloud standard schedulesWP-CLI commands or scripts that should run at a named or shorthand cadence, such as hourly, daily, 2h, or 3w. WP Cloud distributes these jobs within the requested cadence, so a standard schedule does not promise an exact wall-clock minute.
    WP Cloud advanced schedulesA full crontab expression, such as */5 * * * *, for approved managed partners whose host client and site have advanced cron enabled.
    An external schedulerA workflow owned by another system. Requests it sends to the site are handled as normal web traffic.

    Standard schedules accept hourly, daily, twicedaily, and weekly. Shorthand schedules include 2h for twice per hour, 6d for six times per day, and 3w for three times per week. WP Cloud chooses the exact run times within a standard cadence, so two daily entries are unlikely to run at the same time.

    Advanced cron is reserved for approved WP Cloud managed partners. Confirm that the feature is enabled for the host client and site before accepting a full crontab expression. Advanced schedules run at more exact times, so account for the site’s concurrency limit when several entries may start together.

    Avoid using platform cron for long sleeps, repeated self-requests, or cache warming. These patterns keep a worker occupied and can create overlapping work. Use a suitable queue, batch operation, or application-level schedule instead.

    Add a cron entry

    The Add Cron Entry endpoint requires both a schedule and a command. Commands run in an environment similar to an SSH session and can use WP-CLI or site scripts.

    This example adds a harmless command that reads the site’s home URL once per day:

    export WP_CLOUD_SITE='site-id-or-domain'
    
    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data-urlencode 'schedule=daily' \
      --data-urlencode 'command=wp option get home' \
      "https://atomic-api.wordpress.com/api/v1.0/crontab/${WP_CLOUD_SITE}/add"Code language: JavaScript (javascript)

    A successful response returns a cron_id. It confirms that WP Cloud accepted the configuration, not that the command has already run:

    {
      "message": "OK",
      "data": {
        "cron_id": 96
      }
    }Code language: JSON / JSON with Comments (json)

    List, change, or remove entries

    Use the List Cron Entries endpoint to retrieve each entry’s ID, requested schedule, resulting schedule, and command.

    For example, a shorthand request can appear with both its requested value and the resulting crontab schedule:

    {
      "message": "OK",
      "data": [
        {
          "cron_id": 94,
          "schedule": "1 4,16 * * *",
          "requested_schedule": "2h",
          "command": "wp custom sync-products"
        }
      ]
    }Code language: JSON / JSON with Comments (json)

    The Update Cron Entry endpoint changes the command only. To change a schedule, remove the existing entry and add a new one. This avoids leaving duplicate jobs behind.

    Use the Remove Cron Entry endpoint when the job is no longer needed. Removing a running entry prevents future runs but does not interrupt the current run.

    A successful removal returns an empty data array:

    {
      "message": "OK",
      "data": []
    }Code language: JSON / JSON with Comments (json)

    Run commands and scripts

    Cron commands run in an environment similar to an SSH session. WP-CLI finds the correct WordPress installation and can be used directly in the command.

    The working directory is the user’s home directory. Run an executable shell script with a dot-relative path such as ./script.sh, or invoke it with bash script.sh or sh script.sh.

    You can append command output to a file with >>, but WP Cloud does not rotate or delete these files automatically. Log files count toward the site’s filesystem quota, so monitor their size or arrange for their removal.

    Understand runtime limits

    • A cron command can run for up to eight hours.
    • WP Cloud skips a scheduled run when the previous run of that entry has not finished.
    • A site can have up to three cron commands running at once. Additional work is postponed.
    • Cron execution can be delayed in rare cases. Missed runs eventually catch up, but WP Cloud runs the entry only once during the catch-up period rather than once for every missed interval.
    • Duplicate entries can run the same command more than once. List the site’s entries before adding or replacing a schedule.

    Test new commands on a non-production site before scheduling them. Start with a read-only command, list the entry to confirm its stored schedule and command, and remove the test entry when the check is complete.

    Monitor cron results

    Configure Webhooks to receive site-cron-results events for failed commands and concurrency failures. Store the cron ID, site ID, exit status, output, and event time so the host partner can connect a result to the configured entry.

    An accepted API request and a listed cron entry show that the schedule is configured. They do not show that every scheduled run completed successfully.

    Previous WordPress multisite
    Next Decoupled and headless WordPress

    Related Guides

    • ABSPATH

      Understand why ABSPATH points to managed WordPress core on WP Cloud and use WP_CONTENT_DIR for…

      1 Min.

      READ

    • Akismet and Jetpack

      Understand the platform-managed Akismet and Jetpack packages and how to unlock one before removal.

      1 Min.

      READ

    • Install Composer and WP-CLI packages

      Install Composer and site-scoped WP-CLI packages over Client SSH on WP Cloud.

      2 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications