This below is how my
cron_schedule table looks like, how could I avoid having so many cron jobs pending or missed?
This is happening for two possible reasons:
- Low server capacity by the number of cron jobs.
- Not ideal prioritization.
You can solve that by changing the time that Magento takes to schedule the next job, and increasing the Missed if Not Run Within time, in case it's an essential CRON job you can add it to a separate process, if it's not essential you can add many minutes to it.
Don't forget to clean up your cache schedule by running these commands below.
n98-magerun2.phar db:query "DELETE from cron_schedule WHERE status='error' OR status='pending' OR status='missed'"; rm -rf var/cron/* bin/magento cron:run
More details about the Cron (Scheduled Tasks) in the admin panel.