Unable to execute cron.php via SSH nor CRONTABMagento 1.9.1.1 cron.php High Resource Usage?Cron.php Error in Magento 1.9.1.1Cronjobs Magento 1.9.2.2 - Is it possible to have Cron.sh call Cron.php by /usr/php/54/usr/bin/phpCron causing errors in Magento 1.9.2.2Cron.php/Cron.sh Not being called/Manual only - Permission problemhow to solve magento errors as below,How to resolve Magento_Db_Adapter_Pdo_Mysql error in magentoMagento 2.1, Help figuring out Cron job errorOrders showing on account overview but not on historyCron Jobs Not Running

How can Trident be so inexpensive? Will it orbit Triton or just do a (slow) flyby?

Using a siddur to Daven from in a seforim store

Can I use my Chinese passport to enter China after I acquired another citizenship?

A Permanent Norse Presence in America

Can I sign legal documents with a smiley face?

Drawing ramified coverings with tikz

In Star Trek IV, why did the Bounty go back to a time when whales are already rare?

THT: What is a squared annular “ring”?

Bob has never been a M before

What linear sensor for a keyboard?

How do I repair my stair bannister?

How do I implement a file system driver driver in Linux?

Is it improper etiquette to ask your opponent what his/her rating is before the game?

Is it possible to use .desktop files to open local pdf files on specific pages with a browser?

Are all species of CANNA edible?

Java - What do constructor type arguments mean when placed *before* the type?

How do I extrude a face to a single vertex

Confusion on Parallelogram

Varistor? Purpose and principle

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Greco-Roman egalitarianism

Folder comparison

Can somebody explain Brexit in a few child-proof sentences?

Have I saved too much for retirement so far?



Unable to execute cron.php via SSH nor CRONTAB


Magento 1.9.1.1 cron.php High Resource Usage?Cron.php Error in Magento 1.9.1.1Cronjobs Magento 1.9.2.2 - Is it possible to have Cron.sh call Cron.php by /usr/php/54/usr/bin/phpCron causing errors in Magento 1.9.2.2Cron.php/Cron.sh Not being called/Manual only - Permission problemhow to solve magento errors as below,How to resolve Magento_Db_Adapter_Pdo_Mysql error in magentoMagento 2.1, Help figuring out Cron job errorOrders showing on account overview but not on historyCron Jobs Not Running













0















I recently hosted my website using Magento, upon setting up my cron.php i get the following output :



/home/xxx/webapps/abc/cron.php: line 1: ?php
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 2: /**
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 3: bin: command not found
/home/xxx/webapps/abc/cron.php: line 4: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 5: bin: command not found
/home/xxx/webapps/abc/cron.php: line 6: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 7: syntax error near unexpected token `('
/home/xxx/webapps/abc/cron.php: line 7: ` * This source file is subject to the Open Software License (OSL 3.0)


'



I host this on Webfaction, and it appears that this error only happen on Webfaction. My other website (using the same Magento version) which is hosted on another service runs just fine.



Even after i removed the following lines on cron.php, it still does not work:



/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magento.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category Mage
* @package Mage
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/


I've also tried to put "shebang" just before the php opening tag like so:



#!/usr/local/bin/php


And get this result:



/usr/local/bin/php^M: bad interpreter: No such file or directory


Location of PHP



This is what happen when i run php cron.php



enter image description here



I suspect that there might be something wrong with the encoding. Can anyone help me with this ?










share|improve this question
















bumped to the homepage by Community 15 secs ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Please check the path to php using whereis php

    – rafal-kos
    Sep 6 '16 at 7:08











  • @rafal-kos please see my edit.

    – Jeremy
    Sep 6 '16 at 7:11











  • btw whereis php return this : php: /usr/local/bin/php /usr/local/php

    – Jeremy
    Sep 6 '16 at 7:18











  • And how you are calling this cron file? You are trying to run cron.sh or cron.php?

    – rafal-kos
    Sep 6 '16 at 7:25











  • @rafal-kos cron.sh will eventually call cron.php, since calling php cron.php is not working cron.sh is also not working.

    – Jeremy
    Sep 6 '16 at 7:26















0















I recently hosted my website using Magento, upon setting up my cron.php i get the following output :



/home/xxx/webapps/abc/cron.php: line 1: ?php
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 2: /**
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 3: bin: command not found
/home/xxx/webapps/abc/cron.php: line 4: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 5: bin: command not found
/home/xxx/webapps/abc/cron.php: line 6: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 7: syntax error near unexpected token `('
/home/xxx/webapps/abc/cron.php: line 7: ` * This source file is subject to the Open Software License (OSL 3.0)


'



I host this on Webfaction, and it appears that this error only happen on Webfaction. My other website (using the same Magento version) which is hosted on another service runs just fine.



Even after i removed the following lines on cron.php, it still does not work:



/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magento.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category Mage
* @package Mage
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/


I've also tried to put "shebang" just before the php opening tag like so:



#!/usr/local/bin/php


And get this result:



/usr/local/bin/php^M: bad interpreter: No such file or directory


Location of PHP



This is what happen when i run php cron.php



enter image description here



I suspect that there might be something wrong with the encoding. Can anyone help me with this ?










share|improve this question
















bumped to the homepage by Community 15 secs ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Please check the path to php using whereis php

    – rafal-kos
    Sep 6 '16 at 7:08











  • @rafal-kos please see my edit.

    – Jeremy
    Sep 6 '16 at 7:11











  • btw whereis php return this : php: /usr/local/bin/php /usr/local/php

    – Jeremy
    Sep 6 '16 at 7:18











  • And how you are calling this cron file? You are trying to run cron.sh or cron.php?

    – rafal-kos
    Sep 6 '16 at 7:25











  • @rafal-kos cron.sh will eventually call cron.php, since calling php cron.php is not working cron.sh is also not working.

    – Jeremy
    Sep 6 '16 at 7:26













0












0








0








I recently hosted my website using Magento, upon setting up my cron.php i get the following output :



/home/xxx/webapps/abc/cron.php: line 1: ?php
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 2: /**
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 3: bin: command not found
/home/xxx/webapps/abc/cron.php: line 4: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 5: bin: command not found
/home/xxx/webapps/abc/cron.php: line 6: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 7: syntax error near unexpected token `('
/home/xxx/webapps/abc/cron.php: line 7: ` * This source file is subject to the Open Software License (OSL 3.0)


'



I host this on Webfaction, and it appears that this error only happen on Webfaction. My other website (using the same Magento version) which is hosted on another service runs just fine.



Even after i removed the following lines on cron.php, it still does not work:



/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magento.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category Mage
* @package Mage
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/


I've also tried to put "shebang" just before the php opening tag like so:



#!/usr/local/bin/php


And get this result:



/usr/local/bin/php^M: bad interpreter: No such file or directory


Location of PHP



This is what happen when i run php cron.php



enter image description here



I suspect that there might be something wrong with the encoding. Can anyone help me with this ?










share|improve this question
















I recently hosted my website using Magento, upon setting up my cron.php i get the following output :



/home/xxx/webapps/abc/cron.php: line 1: ?php
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 2: /**
: No such file or directory
/home/xxx/webapps/abc/cron.php: line 3: bin: command not found
/home/xxx/webapps/abc/cron.php: line 4: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 5: bin: command not found
/home/xxx/webapps/abc/cron.php: line 6: $'*r': command not found
/home/xxx/webapps/abc/cron.php: line 7: syntax error near unexpected token `('
/home/xxx/webapps/abc/cron.php: line 7: ` * This source file is subject to the Open Software License (OSL 3.0)


'



I host this on Webfaction, and it appears that this error only happen on Webfaction. My other website (using the same Magento version) which is hosted on another service runs just fine.



Even after i removed the following lines on cron.php, it still does not work:



/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magento.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category Mage
* @package Mage
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/


I've also tried to put "shebang" just before the php opening tag like so:



#!/usr/local/bin/php


And get this result:



/usr/local/bin/php^M: bad interpreter: No such file or directory


Location of PHP



This is what happen when i run php cron.php



enter image description here



I suspect that there might be something wrong with the encoding. Can anyone help me with this ?







magento-1.9 cron crontab






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 6 '16 at 7:29







Jeremy

















asked Sep 6 '16 at 6:39









JeremyJeremy

1034




1034





bumped to the homepage by Community 15 secs ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 15 secs ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • Please check the path to php using whereis php

    – rafal-kos
    Sep 6 '16 at 7:08











  • @rafal-kos please see my edit.

    – Jeremy
    Sep 6 '16 at 7:11











  • btw whereis php return this : php: /usr/local/bin/php /usr/local/php

    – Jeremy
    Sep 6 '16 at 7:18











  • And how you are calling this cron file? You are trying to run cron.sh or cron.php?

    – rafal-kos
    Sep 6 '16 at 7:25











  • @rafal-kos cron.sh will eventually call cron.php, since calling php cron.php is not working cron.sh is also not working.

    – Jeremy
    Sep 6 '16 at 7:26

















  • Please check the path to php using whereis php

    – rafal-kos
    Sep 6 '16 at 7:08











  • @rafal-kos please see my edit.

    – Jeremy
    Sep 6 '16 at 7:11











  • btw whereis php return this : php: /usr/local/bin/php /usr/local/php

    – Jeremy
    Sep 6 '16 at 7:18











  • And how you are calling this cron file? You are trying to run cron.sh or cron.php?

    – rafal-kos
    Sep 6 '16 at 7:25











  • @rafal-kos cron.sh will eventually call cron.php, since calling php cron.php is not working cron.sh is also not working.

    – Jeremy
    Sep 6 '16 at 7:26
















Please check the path to php using whereis php

– rafal-kos
Sep 6 '16 at 7:08





Please check the path to php using whereis php

– rafal-kos
Sep 6 '16 at 7:08













@rafal-kos please see my edit.

– Jeremy
Sep 6 '16 at 7:11





@rafal-kos please see my edit.

– Jeremy
Sep 6 '16 at 7:11













btw whereis php return this : php: /usr/local/bin/php /usr/local/php

– Jeremy
Sep 6 '16 at 7:18





btw whereis php return this : php: /usr/local/bin/php /usr/local/php

– Jeremy
Sep 6 '16 at 7:18













And how you are calling this cron file? You are trying to run cron.sh or cron.php?

– rafal-kos
Sep 6 '16 at 7:25





And how you are calling this cron file? You are trying to run cron.sh or cron.php?

– rafal-kos
Sep 6 '16 at 7:25













@rafal-kos cron.sh will eventually call cron.php, since calling php cron.php is not working cron.sh is also not working.

– Jeremy
Sep 6 '16 at 7:26





@rafal-kos cron.sh will eventually call cron.php, since calling php cron.php is not working cron.sh is also not working.

– Jeremy
Sep 6 '16 at 7:26










2 Answers
2






active

oldest

votes


















0














How often are you trying to run the script?



Try something like this:



*/5 * * * * /bin/sh /var/www/mour/cron.sh



That should execute the cron.sh script every 5 minutes.






share|improve this answer






























    0














    after new security patch cron.php does not work directly for that you have to add cron.sh file in your crontab that actually trigger cron.php differnt way and your all cron related task works



    for adding cron.sh in your crontab you can use below syntax



    */5 * * * * /bin/sh magento_base_dir/cron.sh



    please try and let me know






    share|improve this answer






















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "479"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f134861%2funable-to-execute-cron-php-via-ssh-nor-crontab%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      How often are you trying to run the script?



      Try something like this:



      */5 * * * * /bin/sh /var/www/mour/cron.sh



      That should execute the cron.sh script every 5 minutes.






      share|improve this answer



























        0














        How often are you trying to run the script?



        Try something like this:



        */5 * * * * /bin/sh /var/www/mour/cron.sh



        That should execute the cron.sh script every 5 minutes.






        share|improve this answer

























          0












          0








          0







          How often are you trying to run the script?



          Try something like this:



          */5 * * * * /bin/sh /var/www/mour/cron.sh



          That should execute the cron.sh script every 5 minutes.






          share|improve this answer













          How often are you trying to run the script?



          Try something like this:



          */5 * * * * /bin/sh /var/www/mour/cron.sh



          That should execute the cron.sh script every 5 minutes.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 6 '16 at 10:24









          Jigs ParmarJigs Parmar

          1,132423




          1,132423























              0














              after new security patch cron.php does not work directly for that you have to add cron.sh file in your crontab that actually trigger cron.php differnt way and your all cron related task works



              for adding cron.sh in your crontab you can use below syntax



              */5 * * * * /bin/sh magento_base_dir/cron.sh



              please try and let me know






              share|improve this answer



























                0














                after new security patch cron.php does not work directly for that you have to add cron.sh file in your crontab that actually trigger cron.php differnt way and your all cron related task works



                for adding cron.sh in your crontab you can use below syntax



                */5 * * * * /bin/sh magento_base_dir/cron.sh



                please try and let me know






                share|improve this answer

























                  0












                  0








                  0







                  after new security patch cron.php does not work directly for that you have to add cron.sh file in your crontab that actually trigger cron.php differnt way and your all cron related task works



                  for adding cron.sh in your crontab you can use below syntax



                  */5 * * * * /bin/sh magento_base_dir/cron.sh



                  please try and let me know






                  share|improve this answer













                  after new security patch cron.php does not work directly for that you have to add cron.sh file in your crontab that actually trigger cron.php differnt way and your all cron related task works



                  for adding cron.sh in your crontab you can use below syntax



                  */5 * * * * /bin/sh magento_base_dir/cron.sh



                  please try and let me know







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 6 '16 at 10:33









                  Murtuza ZabuawalaMurtuza Zabuawala

                  12.6k73362




                  12.6k73362



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Magento Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f134861%2funable-to-execute-cron-php-via-ssh-nor-crontab%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                      How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2

                      Nissan Patrol Зміст Перше покоління — 4W60 (1951-1960) | Друге покоління — 60 series (1960-1980) | Третє покоління (1980–2002) | Четверте покоління — Y60 (1987–1998) | П'яте покоління — Y61 (1997–2013) | Шосте покоління — Y62 (2010- ) | Посилання | Зноски | Навігаційне менюОфіційний український сайтТест-драйв Nissan Patrol 2010 7-го поколінняNissan PatrolКак мы тестировали Nissan Patrol 2016рвиправивши або дописавши її