@param \HpsPayPlanSchedule $schedule

@return mixed
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');
    }
402673
public function getSchedule()
    {
        /**
         * Default: get the current term schedule data by GET
         * If you want to get the other term's data, use POST
         * TODO: use POST to get other term's data
         */
        $response = $this->buildGetRequest(self::ZF_SCHEDULE_URI, [], $this->headers);
        return $this->parserSchedule($response->getBody());
    }
1316906
protected function defineCommandSchedule(Schedule $schedule, array $definition)
    {
        $arguments = $definition['arguments'] ?? [];

        $event = $schedule->command($definition['command'], $arguments);

        $this->configureEvent($event, $definition);
    }
523192
public static function load() : ScheduledJobStore
    {
        if (is_null(self::$instance)) {
            self::$instance = new ScheduledJobStore(Connection::get());
        }

        return self::$instance;
    }
520624
public function executions(string $schedule)
    {
        return new Executions($this->getHttpClient(), $this->username, $this->repo, $schedule);
    }
537119
public function handle(UpdateScheduleCommand $command)
    {
        $schedule = $command->schedule;

        $schedule->update($this->filter($command));

        event(new ScheduleWasUpdatedEvent($this->auth->user(), $schedule));

        return $schedule;
    }
642904
public function editScheduleAction(Schedule $schedule)
    {
        try {
            $schedule = execute(new UpdateScheduleCommand(
                $schedule,
                Binput::get('name', null),
                Binput::get('message', null),
                Binput::get('status', null),
                Binput::get('scheduled_at', null),
                Binput::get('completed_at', null),
                Binput::get('components', [])
            ));
        } catch (ValidationException $e) {
            return cachet_redirect('dashboard.schedule.edit', [$schedule->id])
                ->withInput(Binput::all())
                ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.schedule.edit.failure')))
                ->withErrors($e->getMessageBag());
        }

        return cachet_redirect('dashboard.schedule.edit', [$schedule->id])
            ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.edit.success')));
    }
277832
public function singleTaskSchedule(TaskNumber $taskNumber, Schedule ...$schedules)
    {
        $events = \array_map(
            function (Schedule $schedule) {
                return $schedule->events();
            },
            $schedules
        );

        $flattenEvents = \array_merge(...$events);

        if (!isset($flattenEvents[$taskNumber->asArrayIndex()])) {
            $tasksCount = \count($flattenEvents);
            throw new TaskNotExistException("Task with id '{$taskNumber->asInt()}' not found. Last task id is '{$tasksCount}'.");
        }

        $event = $flattenEvents[$taskNumber->asArrayIndex()];

        $schedule = new Schedule();
        $schedule->events([$event]);

        return [$schedule];
    }
311159
protected function isScheduled($objectHashId)
    {
        return isset($this->scheduledForInsertion[$objectHashId])
               || isset($this->scheduledForUpdate[$objectHashId])
               || isset($this->scheduledForDeletion[$objectHashId]);
    }
1331687
protected function schedule(Schedule $schedule)
    {
        parent::schedule($schedule);

        // Activate scheduled posts
        $schedule->call(function() {
            $content = Content::where('status_scheduled', '<=', Carbon::now())->get();

            foreach ($content as $item) {
                $item->status = 1;
                $item->status_scheduled = null;
                $item->save();
            }
        })->everyMinute();
    }
82232
public function setSchedule($schedule, $options = [])
    {
        $this->schedule = $schedule;
        $this->setOptions($options);

        return $this;
    }
10236
public static SubscriptionSchedule retrieve(String schedule) throws StripeException {
    return retrieve(schedule, (Map<String, Object>) null, (RequestOptions) null);
  }
262735
public function getScheduledCollections($document)
    {
        $oid = spl_object_hash($document);

        return isset($this->hasScheduledCollections[$oid])
            ? $this->hasScheduledCollections[$oid]
            : [];
    }
589153
protected function _scheduleVars() {
		global $argv;
		$path = $argv[2] . DS;
		$shellName = $argv[3];
		$taskName = $argv[4];

		if (isset($this->args[0]) && $this->hasMethod($this->args[0])) {
			$methodName = $this->args[0];
			array_shift($this->args);
		} else {
			$methodName = null;
		}

		$command = implode(' ', array_filter(array(
			'Console/cake',
			$shellName,
			$taskName,
			$methodName
		)));

		$arguments = $this->args;
		foreach ($this->params as $name => $value) {
			if (in_array($name, array(
						'scheduled',
						'scheduled-depends-on',
						'scheduled-wait-prev',
						'skip-unlogged',
						'scheduled-process-timeout'
							), true)) {
				continue;
			}
			if (is_bool($value) && $value) {
				$arguments[] = '--' . $name;
			} elseif (!is_bool($value)) {
				$arguments['--' . $name] = $value;
			}
		}

		$options = array(
			'timeout' => $this->params['scheduled-process-timeout'],
			'dependsOn' => empty($this->params['scheduled-depends-on']) ? array() : explode(',', $this->params['scheduled-depends-on'])
		);

		return array($command, $path, $arguments, $options);
	}
426564
public function setScheduler(\CampaignChain\CoreBundle\Entity\Scheduler $scheduler = null)
    {
        $this->scheduler = $scheduler;

        return $this;
    }
1333359
public static function scheduled_task_from_record($record) {
        $classname = self::get_canonical_class_name($record->classname);
        if (!class_exists($classname)) {
            debugging("Failed to load task: " . $classname, DEBUG_DEVELOPER);
            return false;
        }
        /** @var \core\task\scheduled_task $task */
        $task = new $classname;
        if (isset($record->lastruntime)) {
            $task->set_last_run_time($record->lastruntime);
        }
        if (isset($record->nextruntime)) {
            $task->set_next_run_time($record->nextruntime);
        }
        if (isset($record->customised)) {
            $task->set_customised($record->customised);
        }
        if (isset($record->component)) {
            $task->set_component($record->component);
        }
        $task->set_blocking(!empty($record->blocking));
        if (isset($record->minute)) {
            $task->set_minute($record->minute);
        }
        if (isset($record->hour)) {
            $task->set_hour($record->hour);
        }
        if (isset($record->day)) {
            $task->set_day($record->day);
        }
        if (isset($record->month)) {
            $task->set_month($record->month);
        }
        if (isset($record->dayofweek)) {
            $task->set_day_of_week($record->dayofweek);
        }
        if (isset($record->faildelay)) {
            $task->set_fail_delay($record->faildelay);
        }
        if (isset($record->disabled)) {
            $task->set_disabled($record->disabled);
        }

        return $task;
    }
559495
protected static function get_schedules() {
		$schedules = wp_get_schedules();
		if ( ! empty( $schedules ) ) {
			uasort( $schedules, 'Cron_Schedule_Command::sort' );
			$schedules = array_map( 'Cron_Schedule_Command::format_schedule', $schedules, array_keys( $schedules ) );
		}
		return $schedules;
	}