Add underlying data changes necessary for new task & schedule features
This commit is contained in:
parent
cf1ac04e39
commit
92cd659db3
13 changed files with 201 additions and 107 deletions
|
@ -18,6 +18,7 @@ use Pterodactyl\Contracts\Extensions\HashidsInterface;
|
|||
* @property string $cron_minute
|
||||
* @property bool $is_active
|
||||
* @property bool $is_processing
|
||||
* @property bool $only_when_online
|
||||
* @property \Carbon\Carbon|null $last_run_at
|
||||
* @property \Carbon\Carbon|null $next_run_at
|
||||
* @property \Carbon\Carbon $created_at
|
||||
|
@ -63,6 +64,7 @@ class Schedule extends Model
|
|||
'cron_minute',
|
||||
'is_active',
|
||||
'is_processing',
|
||||
'only_when_online',
|
||||
'last_run_at',
|
||||
'next_run_at',
|
||||
];
|
||||
|
@ -75,6 +77,7 @@ class Schedule extends Model
|
|||
'server_id' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
'is_processing' => 'boolean',
|
||||
'only_when_online' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -99,6 +102,7 @@ class Schedule extends Model
|
|||
'cron_minute' => '*',
|
||||
'is_active' => true,
|
||||
'is_processing' => false,
|
||||
'only_when_online' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -114,6 +118,7 @@ class Schedule extends Model
|
|||
'cron_minute' => 'required|string',
|
||||
'is_active' => 'boolean',
|
||||
'is_processing' => 'boolean',
|
||||
'only_when_online' => 'boolean',
|
||||
'last_run_at' => 'nullable|date',
|
||||
'next_run_at' => 'nullable|date',
|
||||
];
|
||||
|
@ -122,6 +127,7 @@ class Schedule extends Model
|
|||
* Returns the schedule's execution crontab entry as a string.
|
||||
*
|
||||
* @return \Carbon\CarbonImmutable
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getNextRunDate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue