public function getPendingSchedules(array $whitelist = array(), array $blacklist = array())
    {
        $pendingSchedules = Mage::getModel('cron/schedule')->getCollection()
            ->addFieldToFilter('status', Aoe_Scheduler_Model_Schedule::STATUS_PENDING)
            ->addFieldToFilter('scheduled_at', array('lt' => strftime('%Y-%m-%d %H:%M:%S', time())))
            ->addOrder('scheduled_at', 'ASC');

        $whitelist = array_filter(array_map('trim', $whitelist));
        if (!empty($whitelist)) {
            $pendingSchedules->addFieldToFilter('job_code', array('in' => $whitelist));
        }

        $blacklist = array_filter(array_map('trim', $blacklist));
        if (!empty($blacklist)) {
            $pendingSchedules->addFieldToFilter('job_code', array('nin' => $blacklist));
        }

        return $pendingSchedules;
    }
public function getPendingSchedules(array $whitelist = array(), array $blacklist = array())
    {
        $pendingSchedules = Mage::getModel('cron/schedule')->getCollection()
            ->addFieldToFilter('status', Aoe_Scheduler_Model_Schedule::STATUS_PENDING)
            ->addFieldToFilter('scheduled_at', array('lt' => strftime('%Y-%m-%d %H:%M:%S', time())))
            ->addOrder('scheduled_at', 'ASC');

        $whitelist = array_filter(array_map('trim', $whitelist));
        if (!empty($whitelist)) {
            $pendingSchedules->addFieldToFilter('job_code', array('in' => $whitelist));
        }

        $blacklist = array_filter(array_map('trim', $blacklist));
        if (!empty($blacklist)) {
            $pendingSchedules->addFieldToFilter('job_code', array('nin' => $blacklist));
        }

        return $pendingSchedules;
    }
public function getPendingSchedules ( array $ whitelist = array ( ) , array $ blacklist = array ( ) ) { $ pendingSchedules = Mage :: getModel ( 'cron/schedule' ) -> getCollection ( ) -> addFieldToFilter ( 'status' , Aoe_Scheduler_Model_Schedule :: STATUS_PENDING ) -> addFieldToFilter ( 'scheduled_at' , array ( 'lt' => strftime ( '%Y-%m-%d %H:%M:%S' , time ( ) ) ) ) -> addOrder ( 'scheduled_at' , 'ASC' ) ; $ whitelist = array_filter ( array_map ( 'trim' , $ whitelist ) ) ; if ( ! empty ( $ whitelist ) ) { $ pendingSchedules -> addFieldToFilter ( 'job_code' , array ( 'in' => $ whitelist ) ) ; } $ blacklist = array_filter ( array_map ( 'trim' , $ blacklist ) ) ; if ( ! empty ( $ blacklist ) ) { $ pendingSchedules -> addFieldToFilter ( 'job_code' , array ( 'nin' => $ blacklist ) ) ; } return $ pendingSchedules ; }
Get pending schedules

@param array $whitelist
@param array $blacklist

@return Mage_Cron_Model_Resource_Schedule_Collection
Get pending schedules