public function canRun($throwException = false)
    {
        if ($this->isAlwaysTask()) {
            return true;
        }
        $now = time();
        $time = strtotime($this->getScheduledAt());
        if ($time > $now) {
            // not scheduled yet
            return false;
        }
        $scheduleLifetime = Mage::getStoreConfig(Mage_Cron_Model_Observer::XML_PATH_SCHEDULE_LIFETIME) * 60;
        if ($time < $now - $scheduleLifetime) {
            $this->setStatus(Aoe_Scheduler_Model_Schedule::STATUS_MISSED);
            $this->save();
            if ($throwException) {
                Mage::throwException(Mage::helper('cron')->__('Too late for the schedule.'));
            }
            return false;
        }
        return true;
    }
public function canRun($throwException = false)
    {
        if ($this->isAlwaysTask()) {
            return true;
        }
        $now = time();
        $time = strtotime($this->getScheduledAt());
        if ($time > $now) {
            // not scheduled yet
            return false;
        }
        $scheduleLifetime = Mage::getStoreConfig(Mage_Cron_Model_Observer::XML_PATH_SCHEDULE_LIFETIME) * 60;
        if ($time < $now - $scheduleLifetime) {
            $this->setStatus(Aoe_Scheduler_Model_Schedule::STATUS_MISSED);
            $this->save();
            if ($throwException) {
                Mage::throwException(Mage::helper('cron')->__('Too late for the schedule.'));
            }
            return false;
        }
        return true;
    }
public function canRun ( $ throwException = false ) { if ( $ this -> isAlwaysTask ( ) ) { return true ; } $ now = time ( ) ; $ time = strtotime ( $ this -> getScheduledAt ( ) ) ; if ( $ time > $ now ) { // not scheduled yet return false ; } $ scheduleLifetime = Mage :: getStoreConfig ( Mage_Cron_Model_Observer :: XML_PATH_SCHEDULE_LIFETIME ) * 60 ; if ( $ time < $ now - $ scheduleLifetime ) { $ this -> setStatus ( Aoe_Scheduler_Model_Schedule :: STATUS_MISSED ) ; $ this -> save ( ) ; if ( $ throwException ) { Mage :: throwException ( Mage :: helper ( 'cron' ) -> __ ( 'Too late for the schedule.' ) ) ; } return false ; } return true ; }
Check if this schedule can be run

@param bool $throwException
@return bool
@throws Exception
@throws Mage_Core_Exception
Check if this schedule can be run