You are not logged in.
Pages: 1
Hi,
I noticed a very anoying delay in sending out mails. I did some searching aroudn and found out you can set the settings to cli and make a cronjob.
I did that, but it does not send mails..
I found the installation/cron/php in: /opt/glpi/front/cron.php
I opend crontab -e and entered: */2 * * * * php /opt/glpi/front/cron.php > /dev/null 2>&1
But it's not working. What am i missing here?
Offline
If you haven't read it yet, please refer to the user documentation.
https://glpi-user-documentation.readthe … e-cli-mode
When you added that crontab entry using "crontab -e", you added it to the current user's cron (or root if you used sudo) and that PHP script will run as that user which will either cause some GLPI files to change ownership and break or not have enough permission to access the files needed.
You must have the cron job run as the same user as the web server (www-data, apache, etc).
When you fix the crontab, you will need to verify your GLPI files still have the correct ownership and permissions. Usually the files affected are in "files/_log" and "files/_cache".
You can also have the cron job run every minute rather than every other minute. GLPI will still respect the schedule set for each individual action, but running every minute makes it more accurate.
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
*/2 * * * * /usr/bin/php /opt/glpi/front/cron.php > /dev/null 2>&1
This was the solution, fixed it
Offline
When you added that crontab entry using "crontab -e", you added it to the current user's cron (or root if you used sudo) and that PHP script will run as that user which will either cause some GLPI files to change ownership and break or not have enough permission to access the files needed.
You must have the cron job run as the same user as the web server (www-data, apache, etc).
When you fix the crontab, you will need to verify your GLPI files still have the correct ownership and permissions. Usually the files affected are in "files/_log" and "files/_cache".
You can also have the cron job run every minute rather than every other minute. GLPI will still respect the schedule set for each individual action, but running every minute makes it more accurate.
Well it works fine under root, but to follow your advise i did put the cron job under user www-data.
Ty for the advise!
Offline
* * * * * /usr/bin/php /opt/glpi/front/cron.php > /dev/null 2>&1
And, i changed it to this
Offline
Pages: 1