So here is my issue : I’ve planned the CRON to run every hour, in the job_qeue table it say everytime “success”, I’ve checked the link in the cron and he is ok (with https://).
If I launch the geocode function from the link in the admin/Google Maps Geocode Count:
xxx.xx/index.php?module=jjwg_Maps&entryPoint=jjwg_Maps&cron=1
It work great. The issue cant be the address cause If I fire the link (so geocode it manually) it work great.
Also tryed to enable the logic hook in Google Maps Settings (I think its the before save hook), it change nothing. The issue is that a lot of my user user the map thing, but I cant just launch it manually everytime…
The difference might be that the browser will go through the web server PHP, while cron will use the CLI PHP. These will use different php.ini files for their settings, so there might be some difference there.
Is cron.php getting executed or not? If it is, then you don’t need to mess with cron entries anymore.
In Admin / Schedulers, you can go into individual jobs and check their Last ran succesfully time (make sure it appears to be in the correct timezone, also).
Is any job running? Then your cron.php is executing.
Is the Geocoding job running? Then does it have any error in the logs?
As it is 10h33 here in France I assume its the correct timezone. The bad thing is that to test I’ve put another link and its marked as failed (just to test), If I reput the correct link its marked as success but it fail to cuz the geocode is not updated…
If you can’t understand what’s going wrong, you need to dig a little deeper. Maybe increase log level to DEBUG, see what it does during the job execution, and you can even compare the logs from when it runs successfully to the logs when it doesn’t work.
You can also add logging messages to the code, or (best option) run a debugging session on that code.
After checking in the database, I can see that the registered datetime of the CRON is wrong by -1h .
on the 07/01/2020 at 15h in job_queue table, execute_time I have this :
2020-01-07 14:00:00
so its minus 1hour, maybe it can come from here.
In the user time zone everyone is on Europe/Paris (GMT +1:00)
php ini data : date.timezone = Europe/Paris;
In SSH if I type date I have the correct date time too
The problem is that your web server PHP set up is ok, but your command-line PHP (CLI) isn’t. And this is what is used for the Scheduler Jobs, including the Geocoding one.
This should tell you which PHP it’s executing from command line:
which php
And then you can also know which php.ini that executable is using (you can define a timezone there, although I think first you should point this to a newer executable):
php -i | grep php.ini
You can search for ALL PHP executables in your system:
sudo find / -name php 2>/dev/null
Then it’s a matter of picking the right one, and making sure your PATH points to it first.
It changed nothing it execute the cron with 7.3-cli and put the geocode cron on success in job_queue. Same minus 1 hour on the execute time. Geocode still not doing hes job.
I can see that it use the good php.ini in the diag of the CRM. And so, the good timezone in it.
I will try to put the log on default during 24h …
Edit :
Do you think I have to try something like this ?
cd /xxxxxxxx/xxxxx/xxxxx/xxx/SuiteCRM; php -f cron.php > /dev/null 2>&1
Or maybe I have to specify the php version like this:
cd /xxxxxxxx/xxxxx/xxxxx/xxx/SuiteCRM; php7.3-cli -f cron.php > /dev/null 2>&1