Fix(Crontab): highlight the need for proper crontab setup and CLI execution#155
Fix(Crontab): highlight the need for proper crontab setup and CLI execution#155stonebuzz wants to merge 1 commit intoglpi-project:masterfrom
Conversation
| For Linux/MacOS, you should add the following to the web server's user's (**www-data, apache, etc**) crontab: | ||
|
|
||
| :: | ||
|
|
||
| * * * * * www-data cd GLPI/front && php cron.php |
There was a problem hiding this comment.
Either you use the user crontab, and you do not to specify user name, or you use the global crontab and you must add the user name to use for run.
Seems inconsistent here.
There was a problem hiding this comment.
It may be OK to document both options separately as some user may want to manage all "system" crontabs together and not use the web server user's crontab.
I don't see the functional difference of changing the actual command from "php GLPI/front/cron.php" to "cd GLPI/front && php cron.php".
|
|
||
| php GLPI/front/cron.php --force mailgate | ||
|
|
||
|
|
There was a problem hiding this comment.
Maybe duplucating the same remarks should be avoid addign a paragraph on cron configuration independant of the way it's run?
| sudo -u www-data php GLPI/front/cron.php --force mailgate | ||
|
|
||
| You will need to replace `GLPI` with the path to your GLPI folder. | ||
| You may also need to replace `php` with the full path to your php binary if it is not in the PATH (`/usr/bin/php`). |
There was a problem hiding this comment.
Should suggest replacing it with the path to the specific version of PHP loaded in the web server for GLPI, whether that be the Apache module, FPM, etc.
This PR improves the documentation of crontab configuration for running GLPI CLI tasks.
Changes
www-data,apache, etc.) when setting up the crontab.cd) before running the PHP command.sudo -uto run CLI tasks manually as the correct user./usr/bin/php) may be needed if it's not available in the environmentPATH.