class Cron implements WorkerManagerInterface

Cron jobs

Methods

string
getPort()

Get host

string
getHost()

Get port

string
getTitle()

Get title

string|null
getDescription()

Get description

static string
getCronCommand(string $minutes = '5')

Get cron command

static mixed
runCronCommand()

Run cron command

static bool
isCronCommand(string $command)

Retrun true if command is crontab command

mixed
reInstall()

Reinstall cron entry for scheduler

bool
run()

Add cron entry for scheduler

bool
stop()

Remove cron entry for scheduler

bool
isRunning()

Return true if crontab entry is exists

bool
hasJobs(array $jobs)

Return true if crontab have jobs

array
getJobs()

Get crontab jobs

bool
hasJob(string $command)

Return true if crontab have job

void
addJob(string $command)

Add cron tab job

mixed
addJobs(array $commands)

Add cron tab jobs

mixed
removeAll()

Remove all job from crontab

bool
removeJob(string $command)

Delete crontab job

array
getDetails()

get cron details.

Details

at line 33
string getPort()

Get host

Return Value

string

at line 43
string getHost()

Get port

Return Value

string

at line 53
string getTitle()

Get title

Return Value

string

at line 63
string|null getDescription()

Get description

Return Value

string|null

at line 74
static string getCronCommand(string $minutes = '5')

Get cron command

Parameters

string $minutes

Return Value

string

at line 86
static mixed runCronCommand()

Run cron command

Return Value

mixed

at line 100
static bool isCronCommand(string $command)

Retrun true if command is crontab command

Parameters

string $command

Return Value

bool

at line 112
mixed reInstall()

Reinstall cron entry for scheduler

Return Value

mixed

at line 124
bool run()

Add cron entry for scheduler

Return Value

bool

at line 136
bool stop()

Remove cron entry for scheduler

Return Value

bool

at line 153
bool isRunning()

Return true if crontab entry is exists

Return Value

bool

at line 171
bool hasJobs(array $jobs)

Return true if crontab have jobs

Parameters

array $jobs

Return Value

bool

at line 183
array getJobs()

Get crontab jobs

Return Value

array

at line 199
bool hasJob(string $command)

Return true if crontab have job

Parameters

string $command

Return Value

bool

at line 212
void addJob(string $command)

Add cron tab job

Parameters

string $command

Return Value

void

at line 230
mixed addJobs(array $commands)

Add cron tab jobs

Parameters

array $commands

Return Value

mixed

at line 250
mixed removeAll()

Remove all job from crontab

Return Value

mixed

at line 261
bool removeJob(string $command)

Delete crontab job

Parameters

string $command

Return Value

bool

at line 279
array getDetails()

get cron details.

Return Value

array