You are not logged in.
Pages: 1
Hi there (sorry for my poor English)
As part of an installation of GLPI on my ionos hosting I need help to configure the CRON for the automatic actions of my GLPI. I would like this to run every minute.
-------------------------------
After several hours of testing I am lost.
GLPI: 10.0.5
Execution Mode: CLI
Hosting: Web Expert from IONOS
Ionos PHP Version: 8.1
glpi installation folder: olivier
-------------------------------
SSH connection to my hosting OK via Putty.
Ordered:
crontab -e
Then:
*/1 * * * * php8.1 $HOME/olivier/front/cron.php
/etc/init.d/cron reload
I validate, I test, ok no error.
But yet nothing happens. The mail waiting list is always full.
If anyone could help me I would be grateful.
Thanks in advance ?
Offline
Hi
*/5 * * * * www-data cd /var/www/html/glpi/front/ && php cron.php > /dev/null
--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS
Offline
Hi
*/5 * * * * www-data cd /var/www/html/glpi/front/ && php cron.php > /dev/null
WebGreg thank you for your answer. The command line you gave me does not work.
I checked the logs (I hadn't thought to look before) and a priori the cron works well because here are the last lines I have:
2022-11-21 17:35:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:36:02 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:37:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:38:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:39:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:40:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:41:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:47:45 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:48:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:49:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:50:02 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:51:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:52:02 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:52:08 [2@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:53:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:54:01 [@infong-eu137]
Internal #1: Nothing to throw
2022-11-21 17:55:01 [@infong-eu137]
So we can see that something is happening and yet... the list of notifications to send is desperately full (but works manually)
Offline
Did you change the path to the correct for your environment?
I also found:
*/1 * * * * root /usr/bin/php /var/www/glpi/front/cron.php &>/dev/null"
although for root it is not recommended from what I associate
Or you can try running the jobs manually and see if cron can handle it after that. I encountered a situation where tasks got stuck and cron did not execute them until manually pushed.
Or https://glpi-install.readthedocs.io/en/ … -line.html:
The php bin/console task:unlock command can be used to unlock stucked cron tasks.
Last edited by WebGreg (2022-11-22 13:30:14)
--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS
Offline
Did you change the path to the correct for your environment?
I also found:
*/1 * * * * root /usr/bin/php /var/www/glpi/front/cron.php &>/dev/null"
although for root it is not recommended from what I associate
Or you can try running the jobs manually and see if cron can handle it after that. I encountered a situation where tasks got stuck and cron did not execute them until manually pushed.
Or glpi-install.readthedocs.io/en/latest/command-line.html:
The php bin/console task:unlock command can be used to unlock stucked cron tasks.
Hello and thank you for your answer.
My installation folder is "olivier".
I have tried many command lines but none of them work including yours.
If I launch manually with the "EXECUTE" button automatic actions of glpi it works very well.
----------------------------
Something else
----------------------------
- Thanks to this post > forum.glpi-project.org/viewtopic.php?id=279173 I was able to update the following SQL tables:
time_zone;
time_zone_name;
time_zone_transition;
time_zone_transition_type;
I then restart the command line under windows and BIM it works.
So locally problem solved.
After checking I realized that these tables did not exist on the SQL ionos database.
So I created and updated them with the SQL file timezone_posix.sql
They are now present.
But.... php8.1 $HOME/olivier/front/cron.php still doesn't work.
Offline
Hi there
I continued with my file writing tests (touch).
The test file is written well on the root folder of my server but impossible to write it on the other folders.
I realized this when I wanted to write to the FRONT folder.
For example, I created a folder named "testcron" at the root, I put a chmod in 777 but the text file is not created, yet I have no error when I type the command.
Strange thing: when I type the same command line to create a text file in a folder that doesn't exist, it doesn't flinch, no error.
I wonder if that's exactly where the problem is. Read/write problems on the FRONT folder (among others)
Offline
Check operating system logs.
Seems that cron related problem.
Offline
cron log file is ok
--
2022-11-23 14:02:38 [@infong-eu137]
Internal #1: Nothing to throw
Offline
Pages: 1