Problem with my cron in custom module in magento 1.9












0














I am unable to call cron into my model using this xml. Please suggest be a way.



app/code/local/Rkt/Crons/etc/config.xml



  <models>
<cronscron>
<class>Rkt_Crons_Model</class>
</cronscron>
</models>
</global>
<crontab>
<jobs>
<cronscron>
<schedule>
<cron_expr>*/1 * * * *</cron_expr>
</schedule>
<run>
<model>cronscron/observer::setStatus</model>
</run>
</cronscron>
</jobs>
</crontab>


/app/code/local/Rkt/Crons/Model/Observer.php



 class Rkt_Crons_Model_Observer
{

public function setStatus()
{

Mage::log("WORKS!");

}
}









share|improve this question





























    0














    I am unable to call cron into my model using this xml. Please suggest be a way.



    app/code/local/Rkt/Crons/etc/config.xml



      <models>
    <cronscron>
    <class>Rkt_Crons_Model</class>
    </cronscron>
    </models>
    </global>
    <crontab>
    <jobs>
    <cronscron>
    <schedule>
    <cron_expr>*/1 * * * *</cron_expr>
    </schedule>
    <run>
    <model>cronscron/observer::setStatus</model>
    </run>
    </cronscron>
    </jobs>
    </crontab>


    /app/code/local/Rkt/Crons/Model/Observer.php



     class Rkt_Crons_Model_Observer
    {

    public function setStatus()
    {

    Mage::log("WORKS!");

    }
    }









    share|improve this question



























      0












      0








      0







      I am unable to call cron into my model using this xml. Please suggest be a way.



      app/code/local/Rkt/Crons/etc/config.xml



        <models>
      <cronscron>
      <class>Rkt_Crons_Model</class>
      </cronscron>
      </models>
      </global>
      <crontab>
      <jobs>
      <cronscron>
      <schedule>
      <cron_expr>*/1 * * * *</cron_expr>
      </schedule>
      <run>
      <model>cronscron/observer::setStatus</model>
      </run>
      </cronscron>
      </jobs>
      </crontab>


      /app/code/local/Rkt/Crons/Model/Observer.php



       class Rkt_Crons_Model_Observer
      {

      public function setStatus()
      {

      Mage::log("WORKS!");

      }
      }









      share|improve this question















      I am unable to call cron into my model using this xml. Please suggest be a way.



      app/code/local/Rkt/Crons/etc/config.xml



        <models>
      <cronscron>
      <class>Rkt_Crons_Model</class>
      </cronscron>
      </models>
      </global>
      <crontab>
      <jobs>
      <cronscron>
      <schedule>
      <cron_expr>*/1 * * * *</cron_expr>
      </schedule>
      <run>
      <model>cronscron/observer::setStatus</model>
      </run>
      </cronscron>
      </jobs>
      </crontab>


      /app/code/local/Rkt/Crons/Model/Observer.php



       class Rkt_Crons_Model_Observer
      {

      public function setStatus()
      {

      Mage::log("WORKS!");

      }
      }






      magento-1.9 php






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      Piyush

      4,76872053




      4,76872053










      asked yesterday









      teja123teja123

      12




      12






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Try changing the job name so that it is different from the models sub-node



          <crontab>
          <jobs>
          <somecron>
          <schedule>
          <cron_expr>*/1 * * * *</cron_expr>
          </schedule>
          <run>
          <model>cronscron/observer::setStatus</model>
          </run>
          </somecron>
          </jobs>
          </crontab>





          share|improve this answer





















          • Thanks for the response, its working now.
            – teja123
            yesterday











          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%2f257115%2fproblem-with-my-cron-in-custom-module-in-magento-1-9%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Try changing the job name so that it is different from the models sub-node



          <crontab>
          <jobs>
          <somecron>
          <schedule>
          <cron_expr>*/1 * * * *</cron_expr>
          </schedule>
          <run>
          <model>cronscron/observer::setStatus</model>
          </run>
          </somecron>
          </jobs>
          </crontab>





          share|improve this answer





















          • Thanks for the response, its working now.
            – teja123
            yesterday
















          0














          Try changing the job name so that it is different from the models sub-node



          <crontab>
          <jobs>
          <somecron>
          <schedule>
          <cron_expr>*/1 * * * *</cron_expr>
          </schedule>
          <run>
          <model>cronscron/observer::setStatus</model>
          </run>
          </somecron>
          </jobs>
          </crontab>





          share|improve this answer





















          • Thanks for the response, its working now.
            – teja123
            yesterday














          0












          0








          0






          Try changing the job name so that it is different from the models sub-node



          <crontab>
          <jobs>
          <somecron>
          <schedule>
          <cron_expr>*/1 * * * *</cron_expr>
          </schedule>
          <run>
          <model>cronscron/observer::setStatus</model>
          </run>
          </somecron>
          </jobs>
          </crontab>





          share|improve this answer












          Try changing the job name so that it is different from the models sub-node



          <crontab>
          <jobs>
          <somecron>
          <schedule>
          <cron_expr>*/1 * * * *</cron_expr>
          </schedule>
          <run>
          <model>cronscron/observer::setStatus</model>
          </run>
          </somecron>
          </jobs>
          </crontab>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          MatijaMatija

          64




          64












          • Thanks for the response, its working now.
            – teja123
            yesterday


















          • Thanks for the response, its working now.
            – teja123
            yesterday
















          Thanks for the response, its working now.
          – teja123
          yesterday




          Thanks for the response, its working now.
          – teja123
          yesterday


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f257115%2fproblem-with-my-cron-in-custom-module-in-magento-1-9%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

          An IMO inspired problem

          Management

          Has there ever been an instance of an active nuclear power plant within or near a war zone?