Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8130387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:41:23+00:00 2026-06-06T08:41:23+00:00

I wanted to setup a cron job inside my module. I followed the instructions

  • 0

I wanted to setup a cron job inside my module. I followed the instructions on Magento wiki – how_to_setup_a_cron_job, but my cron job is simply not executing.

This is my config.xml (app/code/local/Roomstory/Invoice/etc/config.xml)

<?xml version="1.0"?>
<config>    
    <modules>
        <Roomstory_Invoice>
            <version>0.1.1</version>
        </Roomstory_Invoice>
    </modules>
<!-- -->
    <crontab>
        <jobs>
            <roomstoryinvoice_setstatus>
                <schedule><cron_expr>*/10 * * * *</cron_expr></schedule>
                <run><model>roomstory_invoice/setstatus::run</model></run>
            </roomstoryinvoice_setstatus>
        </jobs>
    </crontab>
</config>

And this is my class. (app/code/local/Roomstory/Invoice/Model/Setstatus.php)

<?php
class Roomstory_Invoice_Model_Setstatus {

  public function run() {
    return true;
  }

}
?>

I have installed a Cron Scheduler Module, which shows my cron job listed, but when I try to “run now” (for debugging), I get error –

Invalid callback: roomstory_invoice/setstatus::run does not exist

This something simple, after much trying, I am still not able to find the error. Please tell some other way to do it, or indicate the error in this code.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:41:25+00:00Added an answer on June 6, 2026 at 8:41 am

    In your modules config.xml put the following:

    <config>
        <global>
            <models>
                <roomstoryinvoicecron>
                    <class>Roomstory_Invoice_Model</class>
                </roomstoryinvoicecron>                         
            </models>
        </global>
        <crontab>
            <jobs>
                <roomstoryinvoicecron>
                    <schedule>
                        <cron_expr>*/10 * * * *</cron_expr>
                    </schedule>
                    <run>
                        <model>roomstoryinvoicecron/observer::setStatus</model>
                    </run>
                </roomstoryinvoicecron>
            </jobs>
        </crontab>
    </config>
    

    In app/code/local/Roomstory/Invoice/Model/Observer.php add the following:

    <?php
    class Roomstory_Invoice_Model_Observer {
        public function setStatus() {
            Mage::log("WORKS!");
        }
    }
    

    Make sure logging is enabled and it should work, check the log to be sure 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I set up a Zend Framework application using Zend_Tool, but I wanted multiple modules
I just wanted to setup a small development environment with Python 3. I had
I'm wanted to convert some of my python code to C++ for speed but
I was writing a setup.py for a Python package using setuptools and wanted to
I wanted to create a WCF that employs a singleton pattern but the service
I have a table setup the following way `id` int(11) NOT NULL AUTO_INCREMENT, `eventid`
Today I wanted to write a simple php script, but I got some annoying
I created a setup with Inno Setup and wanted to query the registry using
I have setup Spinner with the layout below, and I wanted to get the
I had setup 64-bit eclipse with 64-bit JRE. I wanted to try QuickTime for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.