2026-10-05 18:10:18 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Schedules;
|
|
|
|
|
|
2026-10-11 23:50:53 -04:00
|
|
|
use Pterodactyl\Exceptions\Http\HttpForbiddenException;
|
2026-10-05 18:10:18 -04:00
|
|
|
use Pterodactyl\Exceptions\Service\ServiceLimitExceededException;
|
|
|
|
|
use Pterodactyl\Models\Schedule;
|
|
|
|
|
use Pterodactyl\Models\Task;
|
|
|
|
|
use Throwable;
|
|
|
|
|
|
|
|
|
|
interface CreatesScheduleTasks
|
|
|
|
|
{
|
|
|
|
|
/**
|
2026-10-11 23:50:53 -04:00
|
|
|
* Append the task to the schedule, or slot it into the requested position by shifting the
|
|
|
|
|
* tasks that follow it. The input is validated here, and a backup task is refused while the
|
|
|
|
|
* server cannot hold any backups.
|
2026-10-11 06:11:40 -04:00
|
|
|
*
|
2026-10-11 19:54:55 -04:00
|
|
|
* @param array<string, mixed> $input action, payload, time_offset, and optionally sequence_id and continue_on_failure
|
2026-10-05 18:10:18 -04:00
|
|
|
*
|
2026-10-11 23:50:53 -04:00
|
|
|
* @throws HttpForbiddenException
|
2026-10-05 18:10:18 -04:00
|
|
|
* @throws ServiceLimitExceededException
|
|
|
|
|
* @throws Throwable
|
|
|
|
|
*/
|
2026-10-11 06:11:40 -04:00
|
|
|
public function create(Schedule $schedule, array $input): Task;
|
2026-10-05 18:10:18 -04:00
|
|
|
}
|