You are not logged in.
Hi.
I have configured my notifications by CLI each 2 minutes (*/2 * * * * apache /usr/bin/php /var/www/html/glpi/front/cron.php). The problem I have is that I want to trigger alarms at different time. For example, I need to send alarm on Event Consumable Alarm when Threshold is reached or in the last case each week, not at the same time within the rest included in cron.php
Some help or clue is welcome.
Offline
cron.php accepts additional arguments for tasks to run
So Using "consumable" should do the trick.
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
Oh great tip ! And do you know where I can find the argument list?. For the moment I'll try with that argument, thank you very much
Last edited by crypto_root (2017-06-10 17:07:55)
Offline
Hi,
I may be wrong but I suspect that the arguments could be the tasks created in Setup->Automatic actions???
Offline
As far as I know in Automatic actions you only defined the execution using GLPI (in my understand trigger actions when users are active in the website) or CLI defined in the crontab of the Linux OS, in my case I edited /etc/crontab and schedule the cron.php each 2 minutes, w/o arguments, thing what will be worth, to execute just specific actions.
Offline
crypto_root, I did a similar cron setup for the mail receiver and mail queue of the helpdesk. I think I'll try out my theory tomorrow. Disable an automatic task and run it using cron.php passing the task name as a parameter.
Quick update.
consumable I disabled long time ago in my setup and I just ran cron directly from the commandline. I used '/usr/bin/php cron.php --force consumable' and output in cron.log is,
2017-06-12 14:48:50 [@glpi]
External #1: Launch consumable
Perhaps an indication it did actually run??? Still not sure.
Last edited by TheLastSuperSaiyan (2017-06-12 16:53:34)
Offline