Define the application's command schedule.

@param  \Illuminate\Console\Scheduling\Schedule  $schedule

@return void
330638
protected function schedule(Schedule $schedule)
    {
        if (!extension_active('automation')) {
            return false;
        }
        $queue = Jobs::all();
        foreach ($queue as $job) {
            if (!(int) $job->active) {
                continue;
            }
            $launch = $job->value['launch'];
            if (!is_array($launch)) {
                if (!is_string($launch)) {
                    continue;
                }
                $schedule->command($job->name)->$launch();
            } else {
                $command = $schedule->command($job->name);
                foreach ($launch as $method => $params) {
                    call_user_func_array(array($command, $method), $params);
                }
            }
        }
    }
911618
public function runDue(Debugger $debugger)
    {
        $debugger->log('Running commands...');

        /** @var \Indatus\Dispatcher\BackgroundProcessRunner $backgroundProcessRunner */
        $backgroundProcessRunner = App::make('Indatus\Dispatcher\BackgroundProcessRunner');

        /** @var \Indatus\Dispatcher\Queue $queue */
        $queue = $this->scheduleService->getQueue($debugger);

        foreach ($queue->flush() as $queueItem) {
            /** @var \Indatus\Dispatcher\Scheduling\ScheduledCommandInterface $command */
            $command = $queueItem->getCommand();

            //determine if the command is enabled
            if ($command->isEnabled()) {
                if ($this->runnableInCurrentMaintenanceSetting($command)) {
                    if ($this->runnableInEnvironment($command)) {
                        $scheduler = $queueItem->getScheduler();

                        $backgroundProcessRunner->run(
                            $command,
                            $scheduler->getArguments(),
                            $scheduler->getOptions(),
                            $debugger
                        );
                    } else {
                        $debugger->commandNotRun(
                            $command,
                            'Command is not configured to run in '.App::environment()
                        );
                    }
                } else {
                    $debugger->commandNotRun(
                        $command,
                        'Command is not configured to run while application is in maintenance mode'
                    );
                }
            } else {
                $debugger->commandNotRun($command, 'Command is disabled');
            }
        }
    }
632413
public function removeAlias($record, $schedule = false)
    {
        if ($schedule) {
            // delay removal until flushed
            $this->scheduledRemoveAlias [] = $this->provider->url($record);
        } else {
            $this->aliasing->removeAlias($this->provider->url($record));
        }
    }
1121204
public function update(Schedule $schedule)
    {
        try {
            $schedule = execute(new UpdateScheduleCommand(
                $schedule,
                Binput::get('name'),
                Binput::get('message'),
                Binput::get('status'),
                Binput::get('scheduled_at'),
                Binput::get('completed_at'),
                Binput::get('components', [])
            ));
        } catch (QueryException $e) {
            throw new BadRequestHttpException();
        }

        return $this->item($schedule);
    }
321677
public function edit(HpsPayPlanSchedule $schedule)
    {
        $data = $schedule->getEditableFieldsWithValues( $schedule );
        $result = $this->doRequest($data, array(
            'verb'     => 'PUT',
            'endpoint' => 'schedules/'.$schedule->scheduleKey,
        ));
        return $this->hydrateObject($result, 'HpsPayPlanSchedule');
    }
1314868
public function checkForNewSchedulers()
    {
        $current = SchedulerRepo::all();

        foreach($this->getScheduledEvents() as $event) {
            if (count($current->where('mutex', $event['mutex'])) < 1) {
                $command = new SchedulerRepo;
                $command->fill($event);
                $command->save();
            }
        }
    }
272554
public function command($command)
    {
        if ($command instanceof CommandInterface) {
            $command->setContainer($this);
        }

        $this['console']->add($command);
    }
924852
public function addSchedule($scheduleId)
    {
        $schedule = new Schedule($this->customerKey, $this->key);
        $schedule->id = $scheduleId;
        return $schedule;
    }
554179
public function get($schedule)
    {
        $id = null;
        if ($schedule instanceof HpsPayPlanSchedule) {
            $id = $schedule->scheduleKey;
        } else {
            $id = $schedule;
        }
        $result = $this->doRequest(null, array(
            'verb'     => 'GET',
            'endpoint' => 'schedules/'.$id,
        ));
        return $this->hydrateObject($result, 'HpsPayPlanSchedule');
    }
321830
protected function loadSchedules()
    {
        /* @var Mage_Cron_Model_Resource_Schedule_Collection $collection */
        $collection = Mage::getModel('cron/schedule')->getCollection();

        $minDate = null;
        $maxDate = null;

        foreach ($collection as $schedule) {
            /* @var Aoe_Scheduler_Model_Schedule $schedule */
            $startTime = $schedule->getStarttime();
            if (empty($startTime)) {
                continue;
            }
            $minDate = is_null($minDate) ? $startTime : min($minDate, $startTime);
            $maxDate = is_null($maxDate) ? $startTime : max($maxDate, $startTime);
            $this->schedules[$schedule->getJobCode()][] = $schedule;
        }

        $this->starttime = $this->hourFloor(strtotime($minDate));
        $this->endtime = $this->hourCeil(strtotime($maxDate));
    }
1206256
public function delete($schedule, $forceDelete = false)
    {
        $id = null;
        if ($schedule instanceof HpsPayPlanSchedule) {
            $id = $schedule->scheduleKey;
        } else {
            $id = $schedule;
        }
        $data = array(
            'forceDelete' => $forceDelete,
        );
        return $this->doRequest($data, array(
            'verb'     => 'DELETE',
            'endpoint' => 'schedules/'.$id,
        ));
    }
349509
public function handle(CreateScheduleCommand $command)
    {
        try {
            $schedule = Schedule::create($this->filter($command));

            event(new ScheduleWasCreatedEvent($this->auth->user(), $schedule));
        } catch (InvalidArgumentException $e) {
            throw new ValidationException(new MessageBag([$e->getMessage()]));
        }

        return $schedule;
    }
1294897
public function schedule()
    {
        $createdAtTime = $this->getCronTimestamp();
        $scheduledAtTime = $createdAtTime;

        /* @var $schedule Schedule */
        $schedule = $this->scheduleCollection->getNewEmptyItem();
        $schedule->setJobCode(Export::JOB_CODE)
            ->setStatus(Schedule::STATUS_PENDING)
            ->setCreatedAt(strftime('%Y-%m-%d %H:%M:%S', $createdAtTime))
            ->setScheduledAt(strftime('%Y-%m-%d %H:%M', $scheduledAtTime));

        $schedule->save();

        return $schedule;
    }
114516
def set_schedule(self, schedule):
        
        self.Tmax = schedule['tmax']
        self.Tmin = schedule['tmin']
        self.steps = int(schedule['steps'])
        self.updates = int(schedule['updates'])
1195639
def schedule(identifier, **kwargs):
    ''''''
    source = actions.schedule(identifier, **kwargs)
    msg = 'Scheduled {source.name} with the following crontab: {cron}'
    log.info(msg.format(source=source, cron=source.periodic_task.crontab))
1102763
protected function defineJobSchedule(Schedule $schedule, array $definition)
    {
        $queue = $definition['queue'] ?? [];

        $event = $schedule->job($definition['job'], $queue);

        $this->configureEvent($event, $definition);
    }
543054
public function showEditSchedule(Schedule $schedule)
    {
        $incidentTemplates = IncidentTemplate::all();

        return View::make('dashboard.maintenance.edit')
            ->withPageTitle(trans('dashboard.schedule.edit.title').' - '.trans('dashboard.dashboard'))
            ->withIncidentTemplates($incidentTemplates)
            ->withSchedule($schedule);
    }