public function setLastRunUser($user = null)
    {
        if (is_null($user)) {
            $user = Mage::helper('aoe_scheduler')->getRunningUser();
        }

        // Log the current user running the schedule if it's executed
        Mage::getModel('core/variable')
            ->loadByCode(Aoe_Scheduler_Helper_Data::VAR_LAST_RUN_USER_CODE)
            ->setCode(Aoe_Scheduler_Helper_Data::VAR_LAST_RUN_USER_CODE)
            ->setName('Scheduler - User Last Run As')
            ->setPlainValue((string) $user)
            ->save();

        return $this;
    }
public function setLastRunUser($user = null)
    {
        if (is_null($user)) {
            $user = Mage::helper('aoe_scheduler')->getRunningUser();
        }

        // Log the current user running the schedule if it's executed
        Mage::getModel('core/variable')
            ->loadByCode(Aoe_Scheduler_Helper_Data::VAR_LAST_RUN_USER_CODE)
            ->setCode(Aoe_Scheduler_Helper_Data::VAR_LAST_RUN_USER_CODE)
            ->setName('Scheduler - User Last Run As')
            ->setPlainValue((string) $user)
            ->save();

        return $this;
    }
public function setLastRunUser ( $ user = null ) { if ( is_null ( $ user ) ) { $ user = Mage :: helper ( 'aoe_scheduler' ) -> getRunningUser ( ) ; } // Log the current user running the schedule if it's executed Mage :: getModel ( 'core/variable' ) -> loadByCode ( Aoe_Scheduler_Helper_Data :: VAR_LAST_RUN_USER_CODE ) -> setCode ( Aoe_Scheduler_Helper_Data :: VAR_LAST_RUN_USER_CODE ) -> setName ( 'Scheduler - User Last Run As' ) -> setPlainValue ( ( string ) $ user ) -> save ( ) ; return $ this ; }
Set the user who ran the last successfully started schedule into a core variable
@param  string|null $user Optional: if specified, overrides the default
@return self
Set the user who ran the last successfully started schedule into a core variable