remove crontask from hook - no more supported

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@129 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
remicollet
2010-01-05 17:05:24 +00:00
parent 54e3298027
commit af4398aece
2 changed files with 5 additions and 45 deletions

View File

@ -101,7 +101,7 @@ class PluginExampleExample extends CommonDBTM {
global $LANG;
switch ($name) {
case 'sample2' :
case 'Sample' :
return array('description' => $LANG['plugin_example']['test']." (class)",
'parameter' => $LANG['plugin_example']['test']);
}
@ -118,10 +118,10 @@ class PluginExampleExample extends CommonDBTM {
* <0 : to be run again (not finished)
* 0 : nothing to do
*/
static function cronSample2($task) {
static function cronSample($task) {
$task->log("Example log message from class");
$task->setVolume(mt_rand(0,10));
$task->setVolume(mt_rand(0,$task->fields['param']));
return 1;
}