Clean Cron Schedule
vendic/magento2-clean-cron-schedule
Automatically removes stale rows from the cron_schedule table once a day, preventing it from growing huge and causing slow cron runs and heavy CPU usage.
Supported Magento versions: 2.4.9
9,939 installs★ 9 starsLatest: v1.0.8Released 2024-04-19License: MIT
composer require vendic/magento2-clean-cron-scheduleREADME
Reproduced from the package’s own README, under its own license, as of 2026-09-13. Links and images point back at the source repository.
Magento 2.2 has issues with giant cron_schedule tables. The cron job running time will increase when the table gets bigger, causing heavy CPU usage.
In one of our stores the cron_schedule table exeeded 1.000.000 rows. To identify the problem run the following SQL query:
SELECT count(*) FROM `cron_schedule`
Remove the old rows in cron schedule:
DELETE FROM cron_schedule WHERE scheduled_at < Date_sub(Now(), interval 24 hour);
This module will execute the cleanup query once a day.
composer require vendic/magento2-clean-cron-schedule
Vendic - Magento 2 develops technically challenging e-commerce websites using Magento 2. Feel free to check out our projects on our website.
Links
- Packagist
- PackageMaven — quality data by PackageMaven
- Repository
- Issues