Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

Creating Cron Job Programatically How to create a cron job programatically?

How can I create a cron job in Magento without defining <run><model></model></run> in the XML?

I have a lot of jobs that need to be changed programmatically and we couldn't defineddefine all of these jobs in the XML as these need to be dynamic.

So far, this insert the job in the magento cron, however, there's no run/model defined:

Mage::getModel('core/config_data')
                ->load(self::CRON_STRING_PATH, 'path')
                ->setValue($cronExprString)
                ->setPath(self::CRON_STRING_PATH)
                ->save();

Creating Cron Job Programatically

How can I create a cron job in Magento without defining <run><model></model></run> in the XML?

I have a lot of jobs that need to be changed programmatically and we couldn't defined all of these jobs in the XML as these need to be dynamic.

So far, this insert the job in the magento cron, however, there's no run/model defined:

Mage::getModel('core/config_data')
                ->load(self::CRON_STRING_PATH, 'path')
                ->setValue($cronExprString)
                ->setPath(self::CRON_STRING_PATH)
                ->save();

How to create a cron job programatically?

How can I create a cron job in Magento without defining <run><model></model></run> in the XML?

I have a lot of jobs that need to be changed programmatically and we couldn't define all of these jobs in the XML as these need to be dynamic.

So far, this insert the job in the magento cron, however, there's no run/model defined:

Mage::getModel('core/config_data')
                ->load(self::CRON_STRING_PATH, 'path')
                ->setValue($cronExprString)
                ->setPath(self::CRON_STRING_PATH)
                ->save();
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user