Cron作業顯示待處理狀態


3

現在已經2天了,所有cron作業和cron_schedual都顯示待處理狀態。任何正常運行它們的解決方案?

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.


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/