Crontab_Module

+------------------------------------------------------------+ | apnscp | +------------------------------------------------------------+ | Copyright (c) Apis Networks | +------------------------------------------------------------+ | Licensed under Artistic License 2.0 | +------------------------------------------------------------+ | Author: Matt Saladna (msaladna@apisnetworks.com) | +------------------------------------------------------------+
extends Module\Skeleton\Standard implements Opcenter\Contracts\Hookable
Methods Summary
public
# __construct( )
{{{ void __construct(void)

ignore


Overrides

public
# list_cronjobs( $user = NULL )
}}}
public
# list_jobs( $user = NULL )
List scheduled tasks Invokes crontab -l from the shell and returns the output as an associative
public
# 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.

privilege


public
# user_permitted( $user = NULL )
public
# crontab_enabled( )

Deprecated


see

enabled()
public
# disable_job( $min , $hour , $dom , $month , $dow , $cmd , $user = NULL )
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 $user = NULL )
Schedule a periodic task
public
# set_mailto( string $address )
Set the recipient for cronjob-generated output
public
# get_mailto( )
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 )
Remove a periodic task
public
# reload( )
Reload crond

see

toggle_status()
public
# list_users( )
List all users with an active crontab spool
public
public
public
public
# _edit_user( string $userold , string $usernew , array $oldpwd )
public
# deny_user( string $user )
Deny a user from using crontab facility
public
# permit_user( string $user )
Permit a user access to crontab
public
# restart( )
public
# toggle_status( int $status )
Toggle cronjob status Possible modes: -1: reload 0: kill and remove 1: enable
protected
# _deny_user_real( $user )
protected
# _permit_user_real( $user )
public
# _verify_conf( Opcenter\Service\ConfigurationContext $ctx )
public
public
Methods inherited from Module\Skeleton\Standard
__construct(), set_user_parameters(), clean_user_parameters(), set_session_id(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), get_service_names(), get_services(), get_new_services(), get_active_services(), get_config(), get_service_value(), set_config_journal(), set_config(), query(), _resetModule()
Constants Summary
public array DEPENDENCY_MAP
# array ( 0 => 'siteinfo', 1 => 'ssh', )
public string CRON_SPOOL
# '/var/spool/cron'
public string CRON_PID
# '/var/run/crond.pid'
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id, $pgsql, $mysql