WEEKDAY_SUN
WEEKDAY_SUN
Defines the day of the week as Sunday
The cron class
reloadCrontab() : \Alo\Cron
(re)loads the cron job array
editCronJob(integer $index, string $command, integer|string $minute_const = '*', integer|string $hour = '*', integer|string $day = '*', integer|string $month = '*', integer|string $weekday = '*') : \Alo\Cron
Edits the cron job at index $index. Can be substituded with the full CRON expression (schedule + command) to perform a search - use with caution!
integer | $index | The job index in the crontab array |
string | $command | The command to run |
integer|string | $minute_const | The minute parameter |
integer|string | $hour | The hour parameter |
integer|string | $day | The day of the month parameter |
integer|string | $month | The month parameter |
integer|string | $weekday | The day of the week parameter |
appendCrontab(string $command, integer|string $minute_const = '*', integer|string $hour = '*', integer|string $day = '*', integer|string $month = '*', integer|string $weekday = '*') : \Alo\Cron
Appends the crontab file
string | $command | The command to run |
integer|string | $minute_const | The minute parameter |
integer|string | $hour | The hour parameter |
integer|string | $day | The day of the month parameter |
integer|string | $month | The month parameter |
integer|string | $weekday | The day of the week parameter |
commit() : \Alo\Cron
Saves any changes made
deleteJob(integer $index) : \Alo\Cron
Removes the cron job @ index $index
integer | $index | The cron job's index in the array |
editCrontab(integer $index, string $command, integer|string $minute_const = '*', integer|string $hour = '*', integer|string $day = '*', integer|string $month = '*', integer|string $weekday = '*') : \Alo\Cron
Performs modifiation on the crontab file
integer | $index | The job index in the crontab array |
string | $command | The command to run |
integer|string | $minute_const | The minute parameter |
integer|string | $hour | The hour parameter |
integer|string | $day | The day of the month parameter |
integer|string | $month | The month parameter |
integer|string | $weekday | The day of the week parameter |
When the minute expression is invalid
When the parameters are invalid
When one or more parameters are non-scalar
formatOK(integer|string $min, integer|string $hour, integer|string $day, integer|string $month, integer|string $weekday) : boolean
Checks whether all the fields are formatted properly
integer|string | $min | The minute parameter |
integer|string | $hour | The hour parameter |
integer|string | $day | The day of the month parameter |
integer|string | $month | The month parameter |
integer|string | $weekday | The day of the week parameter |