Schedule cron job for every half hour












0















I need to refresh a link every 5 minutes, how to schedule cron for refreshing the url










share|improve this question














bumped to the homepage by Community 23 mins ago


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




















    0















    I need to refresh a link every 5 minutes, how to schedule cron for refreshing the url










    share|improve this question














    bumped to the homepage by Community 23 mins ago


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


















      0












      0








      0








      I need to refresh a link every 5 minutes, how to schedule cron for refreshing the url










      share|improve this question














      I need to refresh a link every 5 minutes, how to schedule cron for refreshing the url







      magento-1.9 cron






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 17 '16 at 4:32









      vellai duraivellai durai

      2752315




      2752315





      bumped to the homepage by Community 23 mins 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 23 mins ago


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
























          2 Answers
          2






          active

          oldest

          votes


















          0














          Tow way to set cron :



          1) cpanel cron set



          GoTo Cpanel->corn job setting -> set file path.


          2) Using magento . you have to create module .



          app/etc/modules/Compnyname_ModuleName.xml



          <?xml version="1.0"?>
          <config>
          <modules>
          <Compnyname_ModuleName>
          <active>true</active>
          <codePool>local</codePool>
          <version>0.1.0</version>
          </Compnyname_ModuleName>
          </modules>
          </config>


          app/code/local/Compnyname/ModuleName/etc/config.xml



          <?xml version="1.0"?>
          <config>
          <modules>
          <Compnyname_ModuleName>
          <version>0.1.0</version>
          </Compnyname_ModuleName>
          </modules>
          <global>
          <helpers>
          <modulename>
          <class>Compnyname_ModuleName_Helper</class>
          </modulename>
          </helpers>
          <models>
          <modulename>
          <class>Compnyname_ModuleName_Model</class>
          <resourceModel>modulename_mysql4</resourceModel>
          </modulename>
          </models>
          </global>
          <crontab>
          <jobs>
          <modulename_cornmethodname>
          <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
          <run><model>modulename/cron::cornmethodname</model></run>
          </modulename_cornmethodname>
          </jobs>
          </crontab>
          </config>


          <cron_expr>set time setting as you want</cron_expr>



          app/code/local/Compnyname/ModuleName/Helper/Data.php



          <?php
          class Compnyname_ModuleName_Helper_Data extends Mage_Core_Helper_Abstract
          {
          }


          app/code/local/Compnyname/ModuleName/Model/Cron.php



          <?php
          class Compnyname_ModuleName_Model_Cron{
          public function cornmethodname(){
          //do something
          }
          }


          Set your cron code in Cron.php.






          share|improve this answer































            0














            you just point it to your file or page:



            */5 * * * *  curl --silent "http://example.come/some/page" >/dev/null 2>&1





            share|improve this answer
























            • "-":4: bad command errors in crontab file, can't install. it shows this error

              – vellai durai
              Mar 22 '16 at 15:22











            • you can try without --silent

              – MagenX
              Mar 23 '16 at 8:27













            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%2f106647%2fschedule-cron-job-for-every-half-hour%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














            Tow way to set cron :



            1) cpanel cron set



            GoTo Cpanel->corn job setting -> set file path.


            2) Using magento . you have to create module .



            app/etc/modules/Compnyname_ModuleName.xml



            <?xml version="1.0"?>
            <config>
            <modules>
            <Compnyname_ModuleName>
            <active>true</active>
            <codePool>local</codePool>
            <version>0.1.0</version>
            </Compnyname_ModuleName>
            </modules>
            </config>


            app/code/local/Compnyname/ModuleName/etc/config.xml



            <?xml version="1.0"?>
            <config>
            <modules>
            <Compnyname_ModuleName>
            <version>0.1.0</version>
            </Compnyname_ModuleName>
            </modules>
            <global>
            <helpers>
            <modulename>
            <class>Compnyname_ModuleName_Helper</class>
            </modulename>
            </helpers>
            <models>
            <modulename>
            <class>Compnyname_ModuleName_Model</class>
            <resourceModel>modulename_mysql4</resourceModel>
            </modulename>
            </models>
            </global>
            <crontab>
            <jobs>
            <modulename_cornmethodname>
            <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
            <run><model>modulename/cron::cornmethodname</model></run>
            </modulename_cornmethodname>
            </jobs>
            </crontab>
            </config>


            <cron_expr>set time setting as you want</cron_expr>



            app/code/local/Compnyname/ModuleName/Helper/Data.php



            <?php
            class Compnyname_ModuleName_Helper_Data extends Mage_Core_Helper_Abstract
            {
            }


            app/code/local/Compnyname/ModuleName/Model/Cron.php



            <?php
            class Compnyname_ModuleName_Model_Cron{
            public function cornmethodname(){
            //do something
            }
            }


            Set your cron code in Cron.php.






            share|improve this answer




























              0














              Tow way to set cron :



              1) cpanel cron set



              GoTo Cpanel->corn job setting -> set file path.


              2) Using magento . you have to create module .



              app/etc/modules/Compnyname_ModuleName.xml



              <?xml version="1.0"?>
              <config>
              <modules>
              <Compnyname_ModuleName>
              <active>true</active>
              <codePool>local</codePool>
              <version>0.1.0</version>
              </Compnyname_ModuleName>
              </modules>
              </config>


              app/code/local/Compnyname/ModuleName/etc/config.xml



              <?xml version="1.0"?>
              <config>
              <modules>
              <Compnyname_ModuleName>
              <version>0.1.0</version>
              </Compnyname_ModuleName>
              </modules>
              <global>
              <helpers>
              <modulename>
              <class>Compnyname_ModuleName_Helper</class>
              </modulename>
              </helpers>
              <models>
              <modulename>
              <class>Compnyname_ModuleName_Model</class>
              <resourceModel>modulename_mysql4</resourceModel>
              </modulename>
              </models>
              </global>
              <crontab>
              <jobs>
              <modulename_cornmethodname>
              <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
              <run><model>modulename/cron::cornmethodname</model></run>
              </modulename_cornmethodname>
              </jobs>
              </crontab>
              </config>


              <cron_expr>set time setting as you want</cron_expr>



              app/code/local/Compnyname/ModuleName/Helper/Data.php



              <?php
              class Compnyname_ModuleName_Helper_Data extends Mage_Core_Helper_Abstract
              {
              }


              app/code/local/Compnyname/ModuleName/Model/Cron.php



              <?php
              class Compnyname_ModuleName_Model_Cron{
              public function cornmethodname(){
              //do something
              }
              }


              Set your cron code in Cron.php.






              share|improve this answer


























                0












                0








                0







                Tow way to set cron :



                1) cpanel cron set



                GoTo Cpanel->corn job setting -> set file path.


                2) Using magento . you have to create module .



                app/etc/modules/Compnyname_ModuleName.xml



                <?xml version="1.0"?>
                <config>
                <modules>
                <Compnyname_ModuleName>
                <active>true</active>
                <codePool>local</codePool>
                <version>0.1.0</version>
                </Compnyname_ModuleName>
                </modules>
                </config>


                app/code/local/Compnyname/ModuleName/etc/config.xml



                <?xml version="1.0"?>
                <config>
                <modules>
                <Compnyname_ModuleName>
                <version>0.1.0</version>
                </Compnyname_ModuleName>
                </modules>
                <global>
                <helpers>
                <modulename>
                <class>Compnyname_ModuleName_Helper</class>
                </modulename>
                </helpers>
                <models>
                <modulename>
                <class>Compnyname_ModuleName_Model</class>
                <resourceModel>modulename_mysql4</resourceModel>
                </modulename>
                </models>
                </global>
                <crontab>
                <jobs>
                <modulename_cornmethodname>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run><model>modulename/cron::cornmethodname</model></run>
                </modulename_cornmethodname>
                </jobs>
                </crontab>
                </config>


                <cron_expr>set time setting as you want</cron_expr>



                app/code/local/Compnyname/ModuleName/Helper/Data.php



                <?php
                class Compnyname_ModuleName_Helper_Data extends Mage_Core_Helper_Abstract
                {
                }


                app/code/local/Compnyname/ModuleName/Model/Cron.php



                <?php
                class Compnyname_ModuleName_Model_Cron{
                public function cornmethodname(){
                //do something
                }
                }


                Set your cron code in Cron.php.






                share|improve this answer













                Tow way to set cron :



                1) cpanel cron set



                GoTo Cpanel->corn job setting -> set file path.


                2) Using magento . you have to create module .



                app/etc/modules/Compnyname_ModuleName.xml



                <?xml version="1.0"?>
                <config>
                <modules>
                <Compnyname_ModuleName>
                <active>true</active>
                <codePool>local</codePool>
                <version>0.1.0</version>
                </Compnyname_ModuleName>
                </modules>
                </config>


                app/code/local/Compnyname/ModuleName/etc/config.xml



                <?xml version="1.0"?>
                <config>
                <modules>
                <Compnyname_ModuleName>
                <version>0.1.0</version>
                </Compnyname_ModuleName>
                </modules>
                <global>
                <helpers>
                <modulename>
                <class>Compnyname_ModuleName_Helper</class>
                </modulename>
                </helpers>
                <models>
                <modulename>
                <class>Compnyname_ModuleName_Model</class>
                <resourceModel>modulename_mysql4</resourceModel>
                </modulename>
                </models>
                </global>
                <crontab>
                <jobs>
                <modulename_cornmethodname>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run><model>modulename/cron::cornmethodname</model></run>
                </modulename_cornmethodname>
                </jobs>
                </crontab>
                </config>


                <cron_expr>set time setting as you want</cron_expr>



                app/code/local/Compnyname/ModuleName/Helper/Data.php



                <?php
                class Compnyname_ModuleName_Helper_Data extends Mage_Core_Helper_Abstract
                {
                }


                app/code/local/Compnyname/ModuleName/Model/Cron.php



                <?php
                class Compnyname_ModuleName_Model_Cron{
                public function cornmethodname(){
                //do something
                }
                }


                Set your cron code in Cron.php.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 17 '16 at 4:48









                Hitesh VaghasiyaHitesh Vaghasiya

                4781416




                4781416

























                    0














                    you just point it to your file or page:



                    */5 * * * *  curl --silent "http://example.come/some/page" >/dev/null 2>&1





                    share|improve this answer
























                    • "-":4: bad command errors in crontab file, can't install. it shows this error

                      – vellai durai
                      Mar 22 '16 at 15:22











                    • you can try without --silent

                      – MagenX
                      Mar 23 '16 at 8:27


















                    0














                    you just point it to your file or page:



                    */5 * * * *  curl --silent "http://example.come/some/page" >/dev/null 2>&1





                    share|improve this answer
























                    • "-":4: bad command errors in crontab file, can't install. it shows this error

                      – vellai durai
                      Mar 22 '16 at 15:22











                    • you can try without --silent

                      – MagenX
                      Mar 23 '16 at 8:27
















                    0












                    0








                    0







                    you just point it to your file or page:



                    */5 * * * *  curl --silent "http://example.come/some/page" >/dev/null 2>&1





                    share|improve this answer













                    you just point it to your file or page:



                    */5 * * * *  curl --silent "http://example.come/some/page" >/dev/null 2>&1






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Mar 17 '16 at 10:55









                    MagenXMagenX

                    2,0341024




                    2,0341024













                    • "-":4: bad command errors in crontab file, can't install. it shows this error

                      – vellai durai
                      Mar 22 '16 at 15:22











                    • you can try without --silent

                      – MagenX
                      Mar 23 '16 at 8:27





















                    • "-":4: bad command errors in crontab file, can't install. it shows this error

                      – vellai durai
                      Mar 22 '16 at 15:22











                    • you can try without --silent

                      – MagenX
                      Mar 23 '16 at 8:27



















                    "-":4: bad command errors in crontab file, can't install. it shows this error

                    – vellai durai
                    Mar 22 '16 at 15:22





                    "-":4: bad command errors in crontab file, can't install. it shows this error

                    – vellai durai
                    Mar 22 '16 at 15:22













                    you can try without --silent

                    – MagenX
                    Mar 23 '16 at 8:27







                    you can try without --silent

                    – MagenX
                    Mar 23 '16 at 8:27




















                    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%2f106647%2fschedule-cron-job-for-every-half-hour%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

                    What other Star Trek series did the main TNG cast show up in?

                    Berlina muro

                    Berlina aerponto