Methods |
public
|
list_cronjobs(string|null $user = null): array
List cronjobs
|
#
|
public
|
list_jobs(string $user = null): array|false
List scheduled tasks
List scheduled tasks
Invokes crontab -l from the shell and returns the output as an associative
|
#
|
public
|
enabled(): bool
Check if scheduled task service is enabled
Check if scheduled task service is enabled
Returns true if the cron daemon is running within the environment,
false if not. Note well that it will return false IF the cron daemon
is installed within the account, but is not running on the system.
|
#
|
public
|
user_permitted(string $user = null): bool
|
#
|
public
|
filter_by_command(string $command, string|null $user = null): array
Find crons that match a command
Find crons that match a command
|
#
|
public
|
permitted(): bool
Service is permitted
|
#
|
public
|
crontab_enabled(): bool
|
#
|
public
|
disable_job($min, $hour, $dom, $month, $dow, string $cmd, string $user = null): bool
|
#
|
public
|
add_raw($line, $user = null)
|
#
|
public
|
enable_job($min, $hour, $dom, $month, $dow, $cmd, $user = null)
|
#
|
public
|
add_cronjob($min, $hour, $dom, $month, $dow, $cmd, $user = null)
|
#
|
public
|
add_job(mixed $min, mixed $hour, mixed $dom, mixed $month, mixed $dow, string $cmd, string|null $user = null): bool
Schedule a periodic task
Parameters
$min |
minute (0-59)
|
$hour |
hour (0-23)
|
$dom |
day of month (1-31)
|
$month |
month (1-12)
|
$dow |
0-7 day of week
|
$cmd |
command
|
$user |
optional user to runas
|
|
#
|
public
|
match_job(string $command, string|null $user = null): array
Return matching job
Parameters
$command |
regex-style pattern
|
$user |
optional user to match against
|
|
#
|
public
|
exists($min, $hour, $dom, $month, $dow, $cmd, null $user = null): bool
Cronjob exists
|
#
|
public
|
set_mailto(string $address): bool
Set the recipient for cronjob-generated output
Set the recipient for cronjob-generated output
Parameters
|
#
|
public
|
get_mailto(): null|string
Get the recipient e-mail for cronjob-generated output
Get the recipient e-mail for cronjob-generated output
|
#
|
public
|
delete_cronjob($min, $hour, $dom, $month, $dow, $cmd, $user = null)
|
#
|
public
|
delete_job(mixed $min, mixed $hour, mixed $dom, mixed $month, mixed $dow, string $cmd, $user = null): bool
Remove a periodic task
|
#
|
public
|
reload(): bool
Reload crond
|
#
|
public
|
start(): bool
Start crond process
|
#
|
public
|
stop(): bool
Stop crond process
|
#
|
public
|
restart(): bool
|
#
|
public
|
toggle_status(int $status): bool
Toggle cronjob status
Toggle cronjob status
Possible modes:
-1: reload
0: kill and remove
1: enable
Parameters
$status |
status flag [-1,0,1]
|
|
#
|
public
|
list_users(): array
List all users with an active crontab spool
List all users with an active crontab spool
|
#
|
public
|
_delete()
|
#
|
public
|
_create()
|
#
|
public
|
_edit()
|
#
|
public
|
_edit_user(string $userold, string $usernew, array $oldpwd)
|
#
|
public
|
deny_user(string $user): boolean
Deny a user from using crontab facility
Deny a user from using crontab facility
Parameters
|
#
|
public
|
permit_user(string $user): boolean
Permit a user access to crontab
Permit a user access to crontab
|
#
|
public
|
_verify_conf(ConfigurationContext $ctx): bool
|
#
|
public
|
_create_user(string $user)
|
#
|
public
|
_delete_user(string $user)
|
#
|
public
|
_reload(string $why = '', array $args = [])
|
#
|