Fuel Cronjobs Class
This class extends the Fuel_advanced_module class.
Properties Reference
Property | Default Value | Description |
---|---|---|
public | ||
cronfile | crons/crontab.txt | Path to the crontab fle |
mailto | none | Mailto value of crontab |
user | none | The user the crontab belongs to |
sudo_pwd | none | The user password |
permissions | 511 | Sets the permission of the cronfile |
Function Reference [+]
$this->fuel->cronjobs->set_cronfile('$cronfile')
Sets the file path to the cron file.
Returns
void
Parameters
(string) $cronfile cron file path
$this->fuel->cronjobs->add(['$min'='*'], ['$hour'='*'], ['$month_day'='*'], ['$month_num'='*'], ['$week_day'='*'], ['$command'=''])
Adds a new line to the cron file.
Returns
void
Parameters
(string) $min minute value of cronjob (string) $hour hour value of cronjob (string) $month_day day of the month value of cronjob (string) $month_num month value of cronjob (string) $week_day week day value of cronjob (string) $command the command to execute
$this->fuel->cronjobs->validate_command('$cmd')
Validates the command being run to help against malicious attack.
Returns
boolean
$this->fuel->cronjobs->create()
Creates the cron file. If parameters are passed, they will be sent to the add method.
Returns
void
$this->fuel->cronjobs->remove()
Removes the crontab.
Returns
void
$this->fuel->cronjobs->view()
Views a crontab.
Returns
void
$this->fuel->cronjobs->jobs()
Accessor method to the _jobs array that contains a list of the cronjobs.
Returns
void