Test cronu
This commit is contained in:
@@ -6,7 +6,7 @@ if (!defined('GLPI_ROOT')) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class PluginRemoteSupportComputer extends CommonDBTM {
|
class PluginRemotesupportRemotesupport extends CommonDBTM {
|
||||||
|
|
||||||
static function showInfo($item) {
|
static function showInfo($item) {
|
||||||
|
|
||||||
@@ -40,4 +40,15 @@ class PluginRemoteSupportComputer extends CommonDBTM {
|
|||||||
echo '</table>';
|
echo '</table>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function cronRemotesupport($task) {
|
||||||
|
Toolbox::logInFile("remotsupport",'Starting search of agents');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static function cronInfo($name) {
|
||||||
|
return [
|
||||||
|
'description' => "Agent search remotesupport"];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,12 +34,17 @@ function plugin_init_remotesupport()
|
|||||||
if (Plugin::isPluginActive('remotesupport')) {
|
if (Plugin::isPluginActive('remotesupport')) {
|
||||||
|
|
||||||
// $PLUGIN_HOOKS['add_javascript']['remotesupport'][] = 'js/support.js';
|
// $PLUGIN_HOOKS['add_javascript']['remotesupport'][] = 'js/support.js';
|
||||||
include(PLUGIN_REMOTESUPPORT_DIR . "/inc/remotesupport.class.php");
|
// include(PLUGIN_REMOTESUPPORT_DIR . "/inc/remotesupport.class.php");
|
||||||
|
|
||||||
$PLUGIN_HOOKS['autoinventory_information']['remotesupport'] = array(
|
$PLUGIN_HOOKS['autoinventory_information']['remotesupport'] = array(
|
||||||
'Computer' => array('PluginRemoteSupportComputer', 'showInfo')
|
'Computer' => array('PluginRemotesupportRemotesupport', 'showInfo')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CronTask::Register('PluginRemotesupportRemotesupport', 'remotesupport', DAY_TIMESTAMP, [
|
||||||
|
'param' => 24,
|
||||||
|
'mode' => CronTask::MODE_EXTERNAL
|
||||||
|
]);
|
||||||
|
|
||||||
// Add Config Page
|
// Add Config Page
|
||||||
// Plugin::registerClass('PluginRemotesupportConfig', ['addtabon' => 'Config']);
|
// Plugin::registerClass('PluginRemotesupportConfig', ['addtabon' => 'Config']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user