public function isJobCodeRunning($jobCode, $ignoreId = null)
    {
        $collection = Mage::getModel('cron/schedule')
            ->getCollection()
            ->addFieldToFilter('status', Aoe_Scheduler_Model_Schedule::STATUS_RUNNING)
            ->addFieldToFilter('job_code', $jobCode);
        if (!is_null($ignoreId)) {
            $collection->addFieldToFilter('schedule_id', array('neq' => $ignoreId));
        }
        foreach ($collection as $schedule) { /* @var $schedule Aoe_Scheduler_Model_Schedule */
            $alive = $schedule->isAlive();
            if ($alive !== false) { // TODO: how do we handle null (= we don't know because might be running on a different server?
                return true;
            }
        }
        return false;
    }
public function isJobCodeRunning($jobCode, $ignoreId = null)
    {
        $collection = Mage::getModel('cron/schedule')
            ->getCollection()
            ->addFieldToFilter('status', Aoe_Scheduler_Model_Schedule::STATUS_RUNNING)
            ->addFieldToFilter('job_code', $jobCode);
        if (!is_null($ignoreId)) {
            $collection->addFieldToFilter('schedule_id', array('neq' => $ignoreId));
        }
        foreach ($collection as $schedule) { /* @var $schedule Aoe_Scheduler_Model_Schedule */
            $alive = $schedule->isAlive();
            if ($alive !== false) { // TODO: how do we handle null (= we don't know because might be running on a different server?
                return true;
            }
        }
        return false;
    }
public function isJobCodeRunning ( $ jobCode , $ ignoreId = null ) { $ collection = Mage :: getModel ( 'cron/schedule' ) -> getCollection ( ) -> addFieldToFilter ( 'status' , Aoe_Scheduler_Model_Schedule :: STATUS_RUNNING ) -> addFieldToFilter ( 'job_code' , $ jobCode ) ; if ( ! is_null ( $ ignoreId ) ) { $ collection -> addFieldToFilter ( 'schedule_id' , array ( 'neq' => $ ignoreId ) ) ; } foreach ( $ collection as $ schedule ) { /* @var $schedule Aoe_Scheduler_Model_Schedule */ $ alive = $ schedule -> isAlive ( ) ; if ( $ alive !== false ) { // TODO: how do we handle null (= we don't know because might be running on a different server? return true ; } } return false ; }
Check if there's already a job running with the given code

@param string $jobCode
@param int $ignoreId
@return bool
Check if there s already a job running with the given code