getByStatusID( [ 10, 20, 23 ], null, [ 'a.id' => 'asc' ] ); if ( $clf->getRecordCount() > 0 ) { $system_job_queue_batch_id = TTUUID::generateUUID(); foreach ( $clf as $c_obj ) { if ( $c_obj->getStatus() != 30 ) { Debug::text( 'Company: ' . $c_obj->getName() . ' ID: ' . $c_obj->getID(), __FILE__, __LINE__, __METHOD__, 10 ); // //Get recurring schedules that are ready to be committed. // if ( !isset( $config_vars['other']['enable_job_queue'] ) || $config_vars['other']['enable_job_queue'] == true ) { SystemJobQueue::Add( TTi18n::getText( 'Commit Recurring Schedules' ), $system_job_queue_batch_id, 'RecurringScheduleFactory', 'addScheduleFromRecurringScheduleForJobQueue', [ $c_obj->getID(), $initial_start_date, $initial_end_date ], 105 ); } else { $rsf = TTNew( 'RecurringScheduleFactory' ); /** @var RecurringScheduleFactory $rsf */ $rsf->addScheduleFromRecurringSchedule( $c_obj, $initial_start_date, $initial_end_date ); } } else { Debug::text( 'Company is not ACTIVE: ' . $c_obj->getId(), __FILE__, __LINE__, __METHOD__, 10 ); } } } ?>