Property | Type | Description | |
---|---|---|---|
$crontabFileHandler | |||
$user | string | The user executing the comment 'crontab' |
Method | Description | |
---|---|---|
__construct ( boolean | true $parseExistingCrontab = true ) | Constructor | |
addItem ( Crontab\Job | |
||
addJob ( Crontab\Job $job ) : |
Add a new job to the crontab | |
addVariable ( |
||
flush ( ) : |
Remove all crontab content | |
getCrontabExecutable ( ) : string | Get crontab executable location | |
getCrontabFileHandler ( ) : |
Returns a Crontab File Handler | |
getError ( ) : string | Get crontab error | |
getJobs ( ) : Crontab\Job[] | Get all crontab jobs | |
getOutput ( ) : string | Get crontab output | |
getUser ( ) : string | Get unix user to add crontab | |
getVariables ( ) : |
Get all variables in crontab | |
parseExistingCrontab ( ) : |
Parse an existing crontab | |
removeAllJobs ( ) : |
Remove all job in the current crontab | |
removeAllVariables ( ) : |
||
removeJob ( Crontab\Job $job ) : |
Remove a specified job in the current crontab | |
removeVariable ( |
||
render ( ) : string | Render the crontab and associated jobs | |
setCrontabExecutable ( string $crontabExecutable ) : |
Set unix user to add crontab | |
setCrontabFileHandler ( |
Set the Crontab File Handler | |
setJobs ( array $jobs ) : |
Adda new job to the crontab | |
setUser ( string $user ) : |
Set unix user to add crontab | |
setVariables ( array $variables ) : |
||
write ( ) | Write the current crons in the cron table |
public __construct ( boolean | true $parseExistingCrontab = true ) | ||
$parseExistingCrontab | boolean | true |
public addItem ( Crontab\Job | |
||
$item | Crontab\Job | |
|
return |
public addJob ( Crontab\Job $job ) : |
||
$job | Crontab\Job | |
return |
public addVariable ( |
||
$variable | ||
return |
public getCrontabExecutable ( ) : string | ||
return | string |
public getCrontabFileHandler ( ) : |
||
return |
public getJobs ( ) : Crontab\Job[] | ||
return | Crontab\Job[] | An array of Job |
public getVariables ( ) : |
||
return | an array of Variable |
public parseExistingCrontab ( ) : |
||
return |
public removeAllJobs ( ) : |
||
return |
public removeJob ( Crontab\Job $job ) : |
||
$job | Crontab\Job | |
return |
public removeVariable ( |
||
$variable | ||
return |
public setCrontabExecutable ( string $crontabExecutable ) : |
||
$crontabExecutable | string | |
return |
public setCrontabFileHandler ( |
||
$command |
public setVariables ( array $variables ) : |
||
$variables | array | |
return |
protected CrontabFileHandler,crontab $crontabFileHandler | ||
return |
protected string $user | ||
return | string |