0

I have 13 different Cron.php files in several different folders. All of the issues I'm having on Magento seem to be related to cron jobs. Cron job is running, but it doesn't do anything it's supposed to, e.g. send order e-mails, send the newsletter, sync to MailChimp. Am I supposed to do something with all of these Cron.php files? Am I meant to consolidate them somewhere?

  • I assumed, you are talking about Magento 1.x (CE or EE), please correct me if I'm wrong. It's always a good idea to add a version tag to the question, especially since Magento 1 and Magento 2 are quite different. – Fabian Schmengler Sep 12 '16 at 15:48
  • Sorry! Yes it is CE 1.9.2 – Kirra Sep 12 '16 at 15:51
0

Magento only comes with one cron.php and has its own cronjob management, so that all jobs are handled by this single file.

If you have 12 extensions that added their own cron.php files, that's a big red flag, that you have at least 12 low-quality extensions.

Yes, it would be good to refactor all those PHP files into proper Magento crons. But this is probably the least issue with these extensions.

Besides, I don't understand how it should result in this behavior:

Cron job is running, but it doesn't do anything it's supposed to, e.g. send order e-mails, send the newsletter, sync to MailChimp

These Magento cronjobs are executed by the default cron.php, so if it's really running, things should happen.

Your crontab should look similar to this:

* * * * * php /path/to/magento/cron.php -mdefault
* * * * * php /path/to/magento/cron.php -malways
  • They're pretty common extensions, MageMonkey, MailChimp in Magento, PayPal, there's a couple in Ebizmarts folders, a top level one, and a few scattered around the app folder. I've run the cron job manually and it said it ran, but it didn't do anything. How would I put these php files into the proper Magento crons? Just copy the code into it? – Kirra Sep 12 '16 at 15:55
  • Oh, these are Cron.php files, with a capital C, somewhere in the Model directory of the extensions. These are fine and you shouldn't do anything with them directly. – Fabian Schmengler Sep 12 '16 at 16:05
  • Did you add -mdefault to the command? If you don't, it tries to spawn cron.sh which tries to spawn cron.php again. If it doesn't work there's no error message. – Fabian Schmengler Sep 12 '16 at 16:07
  • Our cron tab is a little different, but I've installed AOE scheduler and it says the tasks are running, yet none of the emails are being sent – Kirra Sep 12 '16 at 20:00

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.