1

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

2
  • all Magento cron jobs ? Sep 23, 2020 at 4:50
  • yes, I need the magento cron job list
    – Paul Fan
    Sep 23, 2020 at 20:45

1 Answer 1

1

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

3
  • 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, 2020 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 Sep 25, 2020 at 6:41
  • Or else, you can remove pending status from query and compare both list Sep 25, 2020 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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