cancel
Showing results for 
Search instead for 
Did you mean: 

Cron jobs don't do anything

Cron jobs don't do anything

I have configured the CRONs on my server and they are are running but they don't do anything. ( I have also tried with PHP 7)

 

2 * * * * /usr/local/php56/bin/php-cli /home/pearleng/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/pearleng/public_html/var/log/magento.cron.log
2 * * * * /usr/local/php56/bin/php-cli /home/pearleng/public_html/update/cron.php >> /home/pearleng/public_html/var/log/update.cron.log

2 * * * * /usr/local/php56/bin/php-cli /home/pearleng/public_html/bin/magento setup:cron:run >> /home/pearleng/public_html/var/log/setup.cron.log

 

When I check the Cron Schedule table in the database, they all just say "pending". It doesn't look like anything actually fires.

 

I have had to add another cron to reindex everything every 2 minutes, so that the inventory and product changes take. Any ideas ?

2 REPLIES 2

Re: Cron jobs don't do anything

Is there anything in the logs? (Magento exception log, webserver and php logs)

Re: Cron jobs don't do anything

Are you running cPanel by any chance?

 

I'm running the latest cPanel 

 

I have the a similar problem. My indexers won't update. When I manually run cron through the CLI, Magento reports that cron ran correctly, but it in fact doesn't and the logs remain empty. Running the indexer:reindex command manually works to reindex, but this is not really a solution because it requires manual operation and also clear my cache.

 

My server did pop up a warning (stripped for security/indexing reasons) because of excessive resource usage:

User: <user> PID:2391 PPID:2382 Run Time:185(secs) Memory:113128(kb) RSS:1140(kb) exe:/usr/bin/bash cmd:/bin/bash -c /usr/local/bin/php /home/<user>/<directory>/public_html/bin/magento cron:run | grep -v \"Ran jobs by schedule\" >> /home/<user>/<directory>/public_html/var/log/magento.cron.log >/dev/null

My server is fully updated. Magento runs just fine (and even passes the "readyness check"), but just refuses to run the cron commands.

 

I've already contacted cPanel about this - because it ran fine before. They basically said: "well, that's 3rd party software, and unless you can 100% prove it's cpanel related, F off". I've been doing some searching and it seems I'm not the only one with this problem, but I can't seem to find any solid leads on what causes it. I updated both cPanel and Magento in a very short time interval and I'm not sure which one is the culprit here.

 

Any help is welcome.