mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
cron: sleep some time for stat and test cron frequency
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@201 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
parent
9ab634b313
commit
abbbbf1cad
@ -119,7 +119,9 @@ class PluginExampleExample extends CommonDBTM {
|
||||
static function cronSample($task) {
|
||||
|
||||
$task->log("Example log message from class");
|
||||
$task->setVolume(mt_rand(0,$task->fields['param']));
|
||||
$r = mt_rand(0,$task->fields['param']);
|
||||
usleep(1000000+$r*1000);
|
||||
$task->setVolume($r);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user