class JobScheduler

Properties

$debug

Methods

__construct(Job $job, QueueableJob $backgroundJob = null)

JobScheduler constructor.

void
abort()

Abort a job

void
cancel(bool $isError = true)

Cancel a job

bool
executeQueuedJob()

No description

void
finish()

Finish a job onFinish()

static string
generateJobIdToken(string $prefix = 'job-', int $length = 16)

No description

QueueableJob|null
getQueueableJob()

No description

int
getScheduledTimeValue(int $seconds = 0)

No description

Job|null
scheduleJob(int|null $delayInSeconds = null, int|null $retry_count = null)

Schedules the passed job in the queue

bool
scheduleRetry(int $retryDelay = null)

No description

Details

at line 31
__construct(Job $job, QueueableJob $backgroundJob = null)

JobScheduler constructor.

Parameters

Job $job
QueueableJob $backgroundJob

at line 161
void abort()

Abort a job

Return Value

void

Exceptions

JsonException

at line 183
void cancel(bool $isError = true)

Cancel a job

Parameters

bool $isError

Return Value

void

at line 40
bool executeQueuedJob()

No description

Return Value

bool

Exceptions

JsonException

at line 152
void finish()

Finish a job onFinish()

Return Value

void

at line 144
static string generateJobIdToken(string $prefix = 'job-', int $length = 16)

No description

Parameters

string $prefix
int $length

Return Value

string

Exceptions

Exception

at line 245
QueueableJob|null getQueueableJob()

No description

Return Value

QueueableJob|null

at line 196
int getScheduledTimeValue(int $seconds = 0)

No description

Parameters

int $seconds

Return Value

int

at line 99
Job|null scheduleJob(int|null $delayInSeconds = null, int|null $retry_count = null)

Schedules the passed job in the queue

Parameters

int|null $delayInSeconds
int|null $retry_count

Return Value

Job|null

Exceptions

JsonException
Exception

at line 71
protected bool scheduleRetry(int $retryDelay = null)

No description

Parameters

int $retryDelay

Overrride delay for next retry

Return Value

bool

Exceptions

JsonException