You are not logged in.
Hi there all!
We are having a problem with the cron.php executing queuednotification.
We setted our cron.php like this:
* * * * * /usr/bin/php /var/www/glpi/front/cron.php
and the user running it is the Apache one: www-data
In "Automatic actions" -> "queuednotification" we have this configuration
Status: Scheduled
Run mode: CLI
Run period: 0 -24
Logging from the server it appears that the cron action is executing properly, but the emails are not leaving the queue and are not sent.
Here is the cron.log
root@srvglpi:/# tail -f /var/www/glpi/files/_log/cron.log
2025-03-12 09:53:02 [@srvglpi]
Esterno #5: Avvia createinquest
2025-03-12 09:54:01 [@srvglpi]
Esterno #1: Avvia queuednotification
2025-03-12 09:55:02 [@srvglpi]
Esterno #1: Avvia queuednotification
2025-03-12 09:56:01 [@srvglpi]
Esterno #1: Avvia queuednotification
2025-03-12 09:57:02 [@srvglpi]
Esterno #1: Avvia queuednotification
Also in Automatic actions -> queuednotification -> Log we can see that the command is triggered and runned but without taking any action despite having notifications in the queue.
If we run the queuednotification manually from browser it works just fine and sends (then clears) the notification queue.
Are we missing something? Any help will be appreciated
Specs:
GLPI Version: 10.0.18
Php version: 8.2
SO: Debian 10
Offline
Is anything being shown in the php-errors log when it runs via Cron?
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hi cconard96,
we found the issue and we were able to fix it. Here's how:
The cron.php file located in /var/www/glpi/front was showing the UTC timezone in the log, although the php.ini file and the server time were setted as Europe/Rome.
We forced the correct timezone in cron.php file adding the following string:
//set right timezone
date_default_timezone_set('Europe/Rome');
Now the notifications are being sent correctly.
Thank you so much for the interest and hope this can help some other users too!
Offline