Is there anyway to export the Magento cron job in a list? If possible, including the schedule will be prefect. thanks

  • all Magento cron jobs ? – Hamendra Sunthwal Sep 23 '20 at 4:50
  • yes, I need the magento cron job list – Paul Fan Sep 23 '20 at 20:45
  • +1 for answer acceptance :) – Shoaib Munir Sep 24 '20 at 4:11

You can get all scheduled cronjobs from database by using this query

SELECT c.job_code, c.scheduled_at FROM cron_schedule c 
WHERE c.`status` = 'pending'
GROUP BY c.job_code;

From above query you can find cronjob name with next scheduled timing.
For proper scheduling of cron you can find in your code with job_code. The scheduling will be in cronjob.xml file of module.

It is better to use IDE that finds sting in code, and you will be able to find it

  • Thanks! is it the job status = pending is include all the cron job? or just the job still pending? and they are not include running or success cron job? – Paul Fan Sep 24 '20 at 18:35
  • This will show all the cronjobs, actually if cronjob is active, it will always appear in pending jobs, so that next time it will run on schedule – Shoaib Munir Sep 25 '20 at 6:41
  • Or else, you can remove pending status from query and compare both list – Shoaib Munir Sep 25 '20 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.