Arikaim CMS

Cron
in package
implements WorkerManagerInterface

Cron jobs

Table of Contents

Interfaces

WorkerManagerInterface
Queue worker manager interface

Properties

$command  : string
Cron command
$currentUser  : string
Current user
$interval  : string
Crontab interval

Methods

__construct()  : mixed
Constructor
addJob()  : mixed|false
Add cron tab job
addJobs()  : mixed|false
Add cron tab jobs
getCronCommand()  : string
Get cron command
getDescription()  : string|null
Get description
getDetails()  : array<string|int, mixed>
get cron details.
getHost()  : string
Get port
getJobs()  : array<string|int, mixed>
Get crontab jobs
getPort()  : string
Get host
getTitle()  : string
Get title
hasJob()  : bool
Return true if crontab have job
hasJobs()  : bool
Return true if crontab have jobs
isCronCommand()  : bool
Retrun true if command is crontab command
isRunning()  : bool
Return true if crontab entry is exists
reInstall()  : mixed
Reinstall cron entry for scheduler
removeAll()  : mixed
Remove all job from crontab
removeJob()  : bool
Delete crontab job
run()  : bool
Add cron entry for scheduler
runCronCommand()  : mixed|false
Run cron command
stop()  : mixed
Remove cron entry for scheduler

Properties

$command

Cron command

private static string $command = 'cli scheduler >> /dev/null 2>&1'

$currentUser

Current user

private string $currentUser

$interval

Crontab interval

private string $interval = '5'

Methods

__construct()

Constructor

public __construct([string $interval = '5' ]) : mixed
Parameters
$interval : string = '5'

addJob()

Add cron tab job

public addJob(string $command) : mixed|false
Parameters
$command : string
Return values
mixed|false

addJobs()

Add cron tab jobs

public addJobs(array<string|int, mixed> $commands) : mixed|false
Parameters
$commands : array<string|int, mixed>
Return values
mixed|false

getCronCommand()

Get cron command

public static getCronCommand([string $minutes = '5' ]) : string
Parameters
$minutes : string = '5'
Return values
string

getDescription()

Get description

public getDescription() : string|null
Return values
string|null

getDetails()

get cron details.

public getDetails() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHost()

Get port

public getHost() : string
Return values
string

getJobs()

Get crontab jobs

public getJobs() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPort()

Get host

public getPort() : string
Return values
string

getTitle()

Get title

public getTitle() : string
Return values
string

hasJob()

Return true if crontab have job

public hasJob(string $command) : bool
Parameters
$command : string
Return values
bool

hasJobs()

Return true if crontab have jobs

public hasJobs(array<string|int, mixed> $jobs) : bool
Parameters
$jobs : array<string|int, mixed>
Return values
bool

isCronCommand()

Retrun true if command is crontab command

public static isCronCommand(string $command) : bool
Parameters
$command : string
Return values
bool

isRunning()

Return true if crontab entry is exists

public isRunning() : bool
Return values
bool

reInstall()

Reinstall cron entry for scheduler

public reInstall() : mixed

removeAll()

Remove all job from crontab

public removeAll() : mixed

removeJob()

Delete crontab job

public removeJob(string $command) : bool
Parameters
$command : string
Return values
bool

run()

Add cron entry for scheduler

public run() : bool
Return values
bool

runCronCommand()

Run cron command

public static runCronCommand() : mixed|false
Return values
mixed|false

stop()

Remove cron entry for scheduler

public stop() : mixed

        
On this page

Search results