Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

Upsun Cron Manager gives you a simple on/off switch for the scheduled cron jobs defined in your Upsun (or Platform.sh) application configuration — without editing YAML or redeploying. It reads your platform's cron definitions and stores an enabled/disabled flag for each one in Drupal's State API, so you can pause a runaway or expensive cron, freeze all scheduled tasks during a deployment or data migration, and turn them back on, all from an admin form or Drush.

Features

  • Automatic cron discovery — Reads the crons defined in your Upsun/Platform.sh application config. On the platform it uses the PLATFORM_APPLICATION environment variable; in local development it falls back to parsing .platform.app.yaml at your repository root (path configurable via settings).
  • Per-cron enable/disable — An admin form lists every discovered cron with a checkbox. Toggle individual crons, or use the Enable all / Disable all buttons. State is stored per-cron in the State API and defaults to enabled.
  • Orphan pruning — When a cron is removed from your platform config, its leftover state entry is cleaned up automatically on the next Drupal cron run, and on demand via the upsun:cron-prune Drush command.
  • Integer-backed state — Enabled state is stored as 1/0 so it can be read directly by shell guards in your platform cron command
    [ "$STATE" =
      "0" ] && exit 0

Plan compatibility: This module currently targets the Upsun Fixed plan, where crons are defined in your application configuration and discovered via
PLATFORM_APPLICATION / .platform.app.yaml. Support for Upsun Flex is on the roadmap.

When and why: Use this module when you run Drupal on Upsun or Platform.sh and need to control scheduled crons operationally — pausing a cron that is causing load or errors, suspending all scheduled work during a release or a long data import, or temporarily disabling background tasks in a staging branch — without a code change or redeploy.

Post-Installation

This module is a control plane: it records which crons should run, but it does not intercept the platform scheduler itself. To make the switch take effect, your platform cron command must check the stored state before doing its work.

  1. Install and enable the module as usual (composer require drupal/upsun_cron_manager, then enable it).
  2. Visit the management form at Administration → Configuration → System → Upsun Cron Manager (/admin/config/system/upsun-cron-manager). It requires the Manage Upsun cron states permission. The form lists each cron discovered from your platform config; if it reports no crons, confirm that PLATFORM_APPLICATION is set (on the platform) or that .platform.app.yaml exists at your repository root (locally).
  3. Guard each cron in your .platform.app.yaml so it exits early when disabled. For example:
    crons:
        drupal:
          spec: '*/5 * * * *'
          commands:
            start: |
              STATE=$(drush state:get upsun_cron_manager.enabled.drupal --default=1)
              [ "$STATE" = "0" ] && exit 0
              drush core:cron

    The state key follows the pattern upsun_cron_manager.enabled.{cron_name}, where {cron_name} is the machine name of the cron in your platform config.

  4. (Optional) For deployment freezes, call saveSnapshotAndDisable() in your deploy hook and restoreSnapshot() when finished, via the upsun_cron_manager.cron_state_manager service.

Changes take effect on the next scheduled cron invocation — disabled crons exit immediately rather than running their workload.

Additional Requirements

Activity

Total releases
1
First release
Jun 2026
Latest release
21 hours ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.x-dev Dev Jun 15, 2026