1

I am using Magento 1.9.2.4 version and email not working I also set complete cron in my CPanel with .sh and .php but not working how can I resolved the issue.

php cron :- php -f /home/username/public_html/cron.php

sh cron :- sh /home/username/public_html/cron.sh
  • 1
    already install AOE_Scheduler module – sarfaraz Ahmed Oct 18 '16 at 11:01
  • In my error_log file this type error showing [18-Oct-2016 11:17:41 UTC] PHP Notice: Undefined index: SCRIPT_FILENAME in /home/username/public_html/cron.php on line 41 – sarfaraz Ahmed Oct 18 '16 at 11:19
  • If the cron is not working with these commands, it might be because shell execution via PHP is disabled. Please refer to this answer for a solution: magento.stackexchange.com/questions/137130/… – Fabian Schmengler Oct 20 '16 at 20:31
0

Please follow the steps and check:

1) go to root .htaccess file and comment the below line.

<Files cron.php>

    #Order allow,deny
    #Deny from all

</Files>

2) go to your cpanel and set cron like below

*/5 * * * * wget -O - http://youdomain/cron.php >/dev/null 2>&1

Enjoy :)

1

You dont need to add cron.php file in cronjob cpanel if you have add cron.sh file.

add below instead of yours sh line

bin/sh /home/username/public_html/cron.sh

Solution 2:

add https://www.magentocommerce.com/magento-connect/smtp-pro-email-free-custom-smtp-email.html this extension, in system ->config of this extension you get one setting so you can remove the order mail from the queue and send in real time

Go to system->configuration->Aschroder Extensions->Smtp pro-> Queue Configuration->Queue Usage set it to never and your order email goes directly

  • run this in terminal (cmd) "-bash: bin/sh: No such file or directory" this type error showing – sarfaraz Ahmed Oct 18 '16 at 11:34
  • may be your path is wrong for cron.sh please check via this command ` cd /home/username/public_html` – Murtuza Zabuawala Oct 18 '16 at 11:38
0

Cron job is an important component for correct Magento performance. It is widely used for running actions that are performed on schedule, such as indexing and caching, email dispatches, sitemap generation, currency rates updates, and many more actions as well.

Log in to the server via SSH. Run crontab -e command to add a cron task. At this point you will see a text editor, where you can add or edit cron tasks. Starting from a new line, add the following record:

*/5 * * * * sh /path/to/your/magento/site/root/cron.sh

Again, don’t forget to insert your own default folder path!

Save the changes and close the file. If you did everything correctly, crontab -l command will show you the newly created task.

Not the answer you're looking for? Browse other questions tagged or ask your own question.