Magento 2 Cron blues

I’ve reading about people running in to issues with their Magento Crons, which have always been a bit of a blackhole … where application and system merge … but here is two small queries to help find the longest running Crons in your cron_schedule table and those that were delayed.

Show the top 10 longest running.

select job_code,scheduled_at, timediff(finished_at,executed_ at) TotalTime from cron_schedule where status = 'success' order by TotalTime desc limit 10;

Show the top 10 longest delayed.

select job_code,scheduled_at,timediff(executed_
at,scheduled_at) Delay from cron_schedule where status = 'success' order by Delay desc limit 10;

Good hunting!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.