class JobScheduler

Methods

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

JobScheduler constructor.

void
abort()

Abort a job

void
cancel()

Cancel a job

bool
duplicateScheduledJobExists()

No description

bool
execute()

No description

void
finish()

Finish a job

int
getScheduledTimeValue(int $secounds = 0)

No description

Job|null
scheduleJob(int $delayInSeconds = 0, string $queue = 'default', int $retry_count = 0)

Schedules the passed job in the queue

bool
scheduleRetry(int $retryDelay = 30, string $queue = 'default', bool $createNewJob = true)

No description

Details

at line 27
__construct(Job $job, BackgroundJob $backgroundJob = null)

JobScheduler constructor.

Parameters

Job $job
BackgroundJob $backgroundJob

at line 143
void abort()

Abort a job

Return Value

void

Exceptions

JsonException

at line 161
void cancel()

Cancel a job

Return Value

void

Exceptions

JsonException

at line 178
bool duplicateScheduledJobExists()

No description

Return Value

bool

at line 36
bool execute()

No description

Return Value

bool

Exceptions

JsonException

at line 134
void finish()

Finish a job

Return Value

void

at line 191
int getScheduledTimeValue(int $secounds = 0)

No description

Parameters

int $secounds

Return Value

int

at line 99
Job|null scheduleJob(int $delayInSeconds = 0, string $queue = 'default', int $retry_count = 0)

Schedules the passed job in the queue

Parameters

int $delayInSeconds
string $queue
int $retry_count

Return Value

Job|null

Exceptions

JsonException
Exception

at line 64
bool scheduleRetry(int $retryDelay = 30, string $queue = 'default', bool $createNewJob = true)

No description

Parameters

int $retryDelay
string $queue
bool $createNewJob

Return Value

bool

Exceptions

JsonException