getArg('reprocess')) { $emails = Mage::getModel('helpdesk/email')->getCollection(); foreach ($emails as $email) { Mage::helper('helpdesk/process')->processEmail($email); } } elseif ($this->getArg('fast')) { $cron = Mage::getModel('helpdesk/cron'); $cron->run(true); } elseif ($this->getArg('aggregate')) { Mage::getResourceModel('helpdesk/report_ticket')->aggregate(); } else { $cron = Mage::getModel('helpdesk/cron'); $cron->shellCronRun(); } } } $shell = new Mirasvit_Shell_Helpdesk(); $shell->run();