3

I have created a custom module to sync product details. There is a cron job configured to run model "my_module/Cron::syncDetail". I would like to convert this to a manual job in admin menu.

The syncDetail function in Cron.php is executing

Mage::getModel('My_Module_Model_Product')->syncDetails();

i have managed to create the admin menu drop down, however i can't figure out what to put in the action of the menu.

my question is what is the correct action to directly call the model function?

2 Answers 2

4

Another option you may be interested in, which allows you to keep the current cron job setup, as well as run it manually, is to install AOE Scheduler. It is a highly regarded extension for working with cron jobs and one of its abilities is to run jobs directly from Magento Admin.

2
3

You can not call the model function directly from the admin menu. You need to implement a controller which calls the model function. Your menu entry should target the controller action. For moe information please refer to: http://alanstorm.com/magento_admin_controllers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.