/** * Runs the order export cronjob. * * @param Shopware_Components_Cron_CronJob $Job */ public function runOrderExport(Shopware_Components_Cron_CronJob $Job) { $this->Config->setExportOrderLastRunTimestamp(time()); $this->Config->setExportOrderNextRunTimestamp(time() + $Job->getJob()->getInterval()); if (!$this->Status->maySynchronize()) { $this->Config->setExportOrderStatus(0); return; } try { PlentymarketsExportContinuousController::getInstance()->run('Order'); $this->Config->setExportOrderStatus(1); $this->Config->eraseExportOrderError(); } catch (Exception $E) { $this->Config->setExportOrderStatus(2); $this->Config->setExportOrderError($E->getMessage()); } }