Свойство | Type | Description | |
---|---|---|---|
$dohistory | From CommonDBTM | ||
$rightname |
Méthode | Description | |
---|---|---|
Register ( $itemtype, $name, $frequency, $options = [] ) : boolean | Register new task for plugin (called by plugin during install) | |
Unregister ( $plugin ) : boolean | Unregister tasks for a plugin (call by glpi after uninstall) | |
addVolume ( $volume ) | Increase the currently proccessed volume of a running task | |
callCron ( ) : nothing | Call cron if time since last launch elapsed | |
callCronForce ( ) : boolean | Call cron without time check | |
canDelete ( ) | ||
cleanDBonPurge ( ) | ||
cronCheckUpdate ( $task ) | Cron job to check if a new version is available | |
cronCircularlogs ( $task ) | Circular logs | |
cronGraph ( $task ) | Garbage collector for cleaning graph files | |
cronInfo ( $name ) : array | get Cron description parameter for this class | |
cronLogs ( $task ) | Clean log cron function | |
cronOptimize ( $task ) | Clean log cron function | |
cronSession ( $task ) | Garbage collector for expired file session | |
cronTemp ( $task ) | Garbage collector for cleaning tmp files | |
cronWatcher ( $task ) | Check zombie crontask | |
defineTabs ( $options = [] ) | ||
dropdownFrequency ( $name, $value ) | Dropdown for frequency (interval between 2 actions) | |
dropdownState ( $name, $value, $display = true ) : nothing | Dropdown of state | |
end ( $retcode ) : boolean | Start a task, timer, stat, log, . | |
getDescription ( $id ) : string | Translate task description | |
getForbiddenActionsForMenu ( ) | ||
getForbiddenStandardMassiveAction ( ) | ||
getFromDBbyName ( $itemtype, $name ) : true | Read a Crontask by its name | |
getModeName ( $mode ) : string | Translate Mode to string | |
getNeedToRun ( $mode, $name = '' ) : false | read the first task which need to be run by cron | |
getParameterDescription ( ) : string | Translate task parameter description | |
getSearchOptions ( ) | ||
getSpecificMassiveActions ( $checkitem = NULL ) | ||
getSpecificValueToDisplay ( $field, $values, array $options = [] ) | ||
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) | ||
getStateName ( $state ) : string | Translate state to string | |
getTypeName ( $nb ) | ||
getUsedItemtypes ( ) : array | Get all itemtypes used | |
isDisabled ( ) : integer | Give a task state | |
launch ( $mode, $max = 1, $name = '' ) : the | Launch the need cron tasks | |
log ( $content ) | Add a log message for a running task | |
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids ) | ||
resetDate ( ) | reset the next launch date => for a launch as soon as possible | |
resetState ( ) | reset the current state | |
setVolume ( $volume ) | Set the currently proccessed volume of a running task | |
showForm ( $ID, $options = [] ) : Nothing | Print the contact form | |
showHistory ( ) : nothing | Display list of a runned tasks | |
showHistoryDetail ( $logid ) : nothing | Display detail of a runned task | |
showStatistics ( ) : nothing | Display statistics of a task | |
signal ( $signo ) | Signal handler callback | |
start ( ) : boolean | Start a task, timer, stat, log, . |
Méthode | Description | |
---|---|---|
get_lock ( ) : boolean | Get a global database lock for cron | |
release_lock ( ) | Release the global database lock |
public static Register ( $itemtype, $name, $frequency, $options = [] ) : boolean | ||
$itemtype | itemtype of the plugin object | |
$name | of the task | |
$frequency | of execution | |
$options | array of optional options (state, mode, allowmode, hourmin, hourmax, logs_lifetime, param, comment) | |
Résultat | boolean | for success |
public static Unregister ( $plugin ) : boolean | ||
$plugin | : name of the plugin | |
Résultat | boolean | for success |
public addVolume ( $volume ) | ||
$volume |
static public callCron ( ) : nothing | ||
Résultat | nothing |
static public callCronForce ( ) : boolean | ||
Résultat | boolean | : true if launched |
static public cronCheckUpdate ( $task ) | ||
$task | for log |
static public cronCircularlogs ( $task ) | ||
$task | for log |
static public cronGraph ( $task ) | ||
$task | for log |
static public cronLogs ( $task ) | ||
$task | instance of CronTask |
static public cronOptimize ( $task ) | ||
$task | for log |
static public cronSession ( $task ) | ||
$task | for log |
static public cronTemp ( $task ) | ||
$task | for log |
static public cronWatcher ( $task ) | ||
$task | for log |
public dropdownFrequency ( $name, $value ) | ||
$name | select name | |
$value | default value (default 0) |
static public dropdownState ( $name, $value, $display = true ) : nothing | ||
$name | select name | |
$value | default value (default 0) | |
$display | display or get string (true by default) | |
Résultat | nothing | (display) |
public getDescription ( $id ) : string | ||
$id | integer ID of the crontask | |
Résultat | string |
public getFromDBbyName ( $itemtype, $name ) : true | ||
$itemtype | itemtype of the crontask | |
$name | name of the task | |
Résultat | true | if succeed else false |
public static getModeName ( $mode ) : string | ||
$mode | integer | |
Résultat | string |
public getNeedToRun ( $mode, $name = '' ) : false | ||
$mode | >0 retrieve task configured for this mode <0 retrieve task allowed for this mode (force, no time check) (default 0) | |
$name | one specify action (default '') | |
Résultat | false | if no task to run |
public getParameterDescription ( ) : string | ||
Résultat | string |
static public getSpecificValueToDisplay ( $field, $values, array $options = [] ) | ||
$options | array |
static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) | ||
$field | ||
$name | (default '') | |
$values | (default '') | |
$options | array | array |
public static getStateName ( $state ) : string | ||
$state | integer | |
Résultat | string |
static public getUsedItemtypes ( ) : array | ||
Résultat | array | of itemtypes |
public isDisabled ( ) : integer | ||
Résultat | integer | 0 : task is enabled if disable : 1: by config, 2: by system lock, 3: by plugin |
public static launch ( $mode, $max = 1, $name = '' ) : the | ||
$mode | (internal/external, <0 to force) | |
$max | number of task to launch (default 1) | |
$name | of task to run (default '') | |
Résultat | the | name of last task launched |
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids ) | ||
$ma | MassiveAction | |
$item | CommonDBTM | |
$ids | array |
public resetDate ( ) |
public setVolume ( $volume ) | ||
$volume |
public showForm ( $ID, $options = [] ) : Nothing | ||
$ID | integer ID of the item | |
$options | array - target filename : where to go when done. - withtemplate boolean : template or basic item | |
Résultat | Nothing | (display) |
public showHistory ( ) : nothing | ||
Résultat | nothing |
public showHistoryDetail ( $logid ) : nothing | ||
$logid | : crontasklogs_id | |
Résultat | nothing |
public showStatistics ( ) : nothing | ||
Résultat | nothing |