Simple Cron gives site builders and developers clear, per-job control over Drupal cron tasks. Each job can have its own schedule, status, execution rules, order, and optional settings.
The module automatically discovers Simple Cron plugins and can expose existing hook_cron() implementations and cron-enabled queue workers as independently configurable jobs. Use it when you need per-job scheduling, a lightweight API for implementing custom cron jobs with their own configuration, or both—without adopting a full cron orchestration system.
Features
Visual scheduling and clear previews
- Build common schedules without writing cron syntax, or use an advanced cron expression when a preset does not fit.
- Add multiple schedules to one job. The job runs whenever any expression matches (OR logic).
- See plain-language descriptions and the next five combined run times in the site's configured timezone while keeping the exact expressions visible and editable.
- Review readable schedules, exact expressions, and each job's last and next run in the administration list and Drush output.
Per-job execution control
- Enable or disable individual jobs and control their execution order.
- Run due jobs through Drupal's normal cron process.
- Run individual jobs from the administration UI, with Drush, or through a cron-key-protected URL.
- Exclude individual jobs from default cron runs and choose which jobs may run during maintenance mode.
- Lock jobs while they run and unlock stale locks from the administration UI.
- Show Status report warnings for invalid schedules and enabled jobs that are more than 10 minutes behind schedule.
Drupal and developer integration
- Optionally expose Drupal
hook_cron()implementations and cron-enabled queue workers as configurable jobs. - Define custom jobs with the Simple Cron Plugin API using PHP attributes or legacy annotations.
- Provide a default schedule, execution weight, job-specific configuration form, or multiple job types from one plugin.
- Use the included Simple Cron Examples submodule as a starting point for custom jobs.
Post-installation
- Go to Configuration > System > Cron > Simple cron jobs or visit
/admin/config/system/cron/jobs. - Edit a job to configure its schedule, enabled status, single-URL-only mode, maintenance-mode behavior, and plugin settings.
- Open the Simple cron settings tab to configure execution and lock timeouts and, when needed, expose cron hooks or queue workers as Simple Cron jobs.
- Make sure Drupal cron is triggered by the server, a hosting platform, or Automated Cron. Simple Cron decides which jobs are due when Drupal cron runs; it does not create the external cron trigger.
Declaring a custom job
Custom jobs are provided as Simple Cron plugins. A minimal plugin needs an attribute and a process() method:
<?php namespace Drupal\example\Plugin\SimpleCron; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\simple_cron\Attribute\SimpleCron; use Drupal\simple_cron\Plugin\SimpleCronPluginBase; #[SimpleCron( id: 'example_cleanup', label: new TranslatableMarkup('Example cleanup'), crontab: '0 * * * *', )] final class ExampleCleanup extends SimpleCronPluginBase { public function process(): void { // Run scheduled work. } }
Plugins can also provide job-specific configuration forms. See the configurable job source code in the included simple_cron_examples submodule for a complete example. The submodule also includes an example that provides multiple job types.
Alternatives and similar modules
Ultimate Cron provides more advanced cron orchestration, including parallel execution, launcher and logging options, pool management, and load balancing. Simple Cron focuses on a lighter per-job administration experience, visual and readable scheduling, and execution through Drupal's normal cron process. The two modules are incompatible and cannot be enabled together.
Project information
- Project categories: Administration tools, Developer tools, Performance
3,721 sites report using this module
- Created by edvinas baranauskas on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
First 2.0 release candidate with a visual schedule builder, multiple cron expressions, per-job maintenance-mode control, and Drupal 12 support.




