4

I try to set the right cron for version 1.9.2.3 . I've already put in Cpanel */5 * * * * website/cron.php but I don't receive the order emails.

Can someone tell me, which lines to be modified in cron.php file?

Where to place the "crontab -e" or other additional codes ?

How can I verify which are the correct settings of cron according with my hosting server?

I have a shared SSH hosting, on Linux.

2
  • Your're trying to receive edit the cron for order emails on Magento? Is this correct? Or you are trying to get the cron to run every 5 minutes for overall cron.
    – camdixon
    Commented Oct 11, 2016 at 20:30
  • Yes, i want to receive the order emails and also to make the cron to work properly. thanks
    – Silver
    Commented Oct 12, 2016 at 9:47

2 Answers 2

8

If you are able to open crontab in your shared server then write that command crontab -e to open editor. [it edit it via vim] .

To set your cron every 5 minutes you can use that command

*/5 * * * * /bin/bash /path/to/magento/cron.sh

After that press Esc and type :wq to save and quit your editor

This is good website to check cron times
http://crontab.guru/#*/5_*_*_*_*

7
  • the :wq option assumes user chose vim to edit. Other options are available, but still great answer. Also, the crontab -e command is used on the terminal once you ssh into the server.
    – camdixon
    Commented Oct 11, 2016 at 23:08
  • yes thanks for your opinion. you are right . Thanks Commented Oct 11, 2016 at 23:14
  • Thank you, but i don't know what to do with crontab-e.
    – Silver
    Commented Oct 12, 2016 at 9:38
  • I can not open the crontab, so please tell me if i can do some changes in the files cron.php and cron.sh from my public_html. thanks
    – Silver
    Commented Oct 12, 2016 at 9:42
  • Do you have sudo privileges? I am unsure if this is required to use sudo in front.
    – camdixon
    Commented Oct 12, 2016 at 17:16
0

cron.sh file indirectly calls cron.php file so for proper configuration you need to include cron.sh file in your server crontab -e

following command in your crontab

*/5 * * * *  /bin/sh /absolute/path/to/Yourmagento/cron.sh
3
  • Hi, I solved the problem, after i found on youtube this idea, please comment if is alright, thanks: youtube.com/watch?v=NycpWVESqhA
    – Silver
    Commented Oct 18, 2016 at 19:45
  • If CRON job is not working properly, please follow below steps to send instant emails. Copy Template.php file from app -> code -> core -> Mage -> Core -> Model -> Email Create folder structure like app -> code -> local -> Mage -> Core -> Model -> Email Paste Template.php file in Email folder Open Template.php file and go to line number 407 or search for the following code if ($this->hasQueue() && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) { Replace above code with following if (!($this->hasQueue()) && $this->getQueue() instanceof Mage_Core_Model_Email_Queue) {
    – Silver
    Commented Oct 18, 2016 at 19:45
  • If cron is not working properly, fix the cron. Do not edit core files. Commented Oct 6, 2017 at 12:13

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.