Closed gkukovacec closed 1 year ago
How are you calling/running the Cron script from the cron job?
Hi!
/usr/bin/php /home/xxxxxxxx/public_html/glpi/front/cron.php
Scheduled every minute in cPanel on Linux server.
Thanks! Goran
On 27.11.2022., at 11:19, Curtis Conard @.***> wrote:
How are you calling/running the Cron script from the cron job?
— Reply to this email directly, view it on GitHubhttps://github.com/glpi-project/glpi/issues/13416#issuecomment-1328214327, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABW6F7Q7N53SJNCFRP4Y5T3WKMYUPANCNFSM6AAAAAASLQPPG4. You are receiving this because you authored the thread.Message ID: @.***>
The check used to determine if cron.php
is called from the CLI or web server doesn't seem to be working in that case. The email you receive should only be returned when called from the web server as that empty image is used to defer GLPI mode automatic actions to an async request. In CLI mode, it should trigger some CLI mode actions and return nothing in the response.
A quick search reveals that cPanel puts CGI PHP binaries in /usr/bin
instead of the CLI PHP binary. You would need to use the path /usr/local/bin/php
instead for CLI mode.
This isn't a GLPI bug, just an odd behavior of cPanel.
I can confirm that this solved the problem.
Thanks @cconard96!
Code of Conduct
Is there an existing issue for this?
Version
10.0.5
Bug description
CLI mode doesn't work. Cron log shows Internal #1: Nothing to Launch on every execution.
Email notifications are correctly set up. Test email to administrator works fine.
Upon creating ticket, notification list gets correctly populated (and can be sent manually, emails are sent).
Automatic action of queuednotification is not triggered at all, I have double-checked that it's set to CLI run mode and has status Scheduled. If executed manually notifications are sent. If set to GLPI mode, notifications eventually get sent.
I guess Cronjob works fine, I get this email message from Cron:
_X-Powered-By: PHP/7.4.33 Set-Cookie: glpi_dea0aedf958b8e6c1734f2744227d1ec=23f70cb5961a552d5d5eca1daf9a90b9; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Content-Type: image/gif Content-Length: 63 Cache-Control: no-cache,no-store Pragma: no-cache Connection: close
GIF89a_
So queuednotification was not triggered by Cronjob even once.
Please advise. Am I missing something?
Thanks!
Relevant log output
No response
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
Information about system installation & configuration
Server
GLPI constants
Libraries
SQL replicas
Notifications
Plugins list
Anything else?
No response