4

its been 2 days now all cron jobs and cron_schedual showing pending status. Any solution to run them normally ?

  • are you getting emails ( transnational etc ) – Naveed Asim Mar 16 '18 at 6:25
  • @Naveed few functionalities are working but not all. SO I truncate cron_schedual . after that all cron job status is pending – Learner Mar 16 '18 at 6:31
  • did you try to run cron manually from server ? – Naveed Asim Mar 16 '18 at 6:35
  • @Naveed I install a extension due to which I was enable to run a specifc cronjob so I run all its working. But not running cron jobs automatically. So I truncate table after that all are pending – Learner Mar 16 '18 at 6:37
  • Then you should check that module, since that module is overriding default cron functionalities i guess. however there should be also option to run cron automatically. – Naveed Asim Mar 16 '18 at 6:39
2

It is showing under pending status, as seems cron is not working properly make sure cron is setup and scheduled on your server.

If you have server cpanel access, then Login to cpanel / server and search for cron_tabs and see if cron is set-up and path are defined accurately.

However if you have also/only SSH access you can still setup by follow commands / steps which are listed on magento dev docs:

http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html

NOTE if you are using php multi-version on your server then you should execute commands with proper php library i.e :

/usr/bin/php7.0 bin/magento

hope it will solve the issue.

| improve this answer | |
  • you are <3 brother – Learner Mar 16 '18 at 15:30
  • 1
    @Learner, glad to help :) – Naveed Asim Mar 16 '18 at 15:33
  • brother I need a small help If you are available ? – Learner Mar 19 '18 at 10:35
  • Yes, i am available on chat – Naveed Asim Mar 19 '18 at 11:01
3

I have also been stuck on this for a long time. The Magento 2 cron_schedule table has 20 entries for the same task. It seems it is generating every task for every minute that it is scheduled for but only completes the first one. I think we finally figured it out. After making the following settings.

  • Set cron job in cpanel to run once per minute.
  • set in STORES >> Configuration >> ADVANCED >> SYSTEM >> CRONS -use separate process to "no"
  • then truncate the cron_schedule table

Now all tasks complete!

See this post for screen shots and more detail I hope this helps someone! https://toweringmedia.com/blog/magento-2-cron-job-pending-jobs-never-cleared-solved/

| improve this answer | |

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.