Cron

 

 

This class should not be used in FreePBX 14.0.12 or 15.0.12 or higher. You should use the centralized Job class instead.

Cron Class. Adds and removes entries to Crontab, usually as the Asterisk user

FreePBX::Cron()->getAll();

Function Calls

getAll()

Returns an array of all the lines for the user

/**  * Returns an array of all the lines for the user  * @return array Crontab lines for user  */ public function getAll() {}

checkLine()

Checks if the line exists exactly as is in this users crontab

/**  * Checks if the line exists exactly as is in this users crontab  * @param {string} $line Line to check  * @return {bool} True or false if the line exists  */ public function checkLine($line = null) {}

addLine()

Add the line given to this users crontab

remove()

Remove the line given (if it exists) from this users cronttab.

Note: this will only remove the first if there's a duplicate.

removeLine()

Alias of the function below, removing a line

add()

Add an entry to Cron. Takes either a direct string, or an array

removeAll()

Removes all reference of $cmd in cron

Return to Documentation Home I Return to Sangoma Support