Recently I have cronjob errors.
I myself did not do anything so that can’t be the cause.
Is there perhaps a solution that the cronjob will no longer give errors?
I can reset the cornjob but this only works for a short while.
I use [https://console.cron-job.org myself](https://console.cron-job.org myself)
URL: https://weerstationafferden.nl/pws-froggit/PWS_cron_stationcron.php
Last execution attempt: 05/03/2025 16:10:15 GMT (scheduled: 05/03/2025 16:10:00 GMT) Last status: Failed (415 Unsupported Media Type)
Kind regards
Piet Manders
what error is the cron jog showing in the details on on your cron-job.org
There is a debug console to use . . . .nl/pws-froggit/PWS_module_test.php
The cron job has multiple tasks.
First task is to load all outdated files.
Debug console → Bottom button → click
→ A lot of warning messages
Seems that there is a conflict of file addressing used..
Warning: filemtime(): stat failed for
/home/u828511945/domains/weerstationafferden.nl/public_html/pws/jsondata/metar34EDLV.txt
in
/var/www/vhosts/weerstationafferden.nl/httpdocs/pws-froggit/PWS_load_files.php on line 65
The load files script can not load the DarkSky data:
PWS_load_files.php (502) Darksky_______: time spent: 0.0128 -
PROBLEM => http_code: 500, no valid data
https://weerstationafferden.nl/pws-froggit/PWS_Dark_Openweather.php?lang=nl-nl
Probably you did not update the API key to the new OpenWeather API key needed
QUESTIONS:
- Did you move to another hosting package or provider
- Did you upgrade PHP to a new level
- Did you check the error log of the cron-server. Most allow only a certain size. As there are multiple errors it can be that the max size is reached.
As @hcorrin posted, we need the texts in the corn-provider-log to check what is going wrong.
Succes,
Wim
You should solve the file structure error first
Warning: filemtime(): stat failed for
/home/u828511945/domains/weerstationafferden.nl/public_html/pws/jsondata/metar34EDLV.txt
in
/var/www/vhosts/weerstationafferden.nl/httpdocs/pws-froggit/PWS_load_files.php on line 65
The load-files script can not check the age of the current data-file.
This problem can be caused
- when moving to a new provider or
- switching to a different PHP version
- Copying an existing PWS_Dashboard website to a new one and not deleting all data and system files.
When you study the message: The files are expected to be in
/home/u828511945/domains/weerstationafferden.nl/public_html/pws/
But your scripts run in
/var/www/vhosts/weerstationafferden.nl/httpdocs/pws-froggit/
Even the pwsdashboard folder is different: pws ↔ pws-froggit
That results in an HTML error message your cron provider seems not to accept.
IMPORTANT @ALL
If the load-files script can not find / check the “old” data-file, it assumes that it is never loaded. So it will load the data-file every time the script is executed.
Every 5 minute cron-job AND every new visitor to the website and every pop-up or reload for an existing visitor.
This unnecessary loading of files will diminish your API-access allowances, f.i. for WU-data (history-graphs) or API-forecasts (Open-Weather, Aeris a.s.o.)
SOLUTION:
When moving websites to another location:
- Run easyweather-setup and press the Save your settings button. This will load the new file structure to save the newly loaded files.
- Delete the _my_settings/status.arr file. In this file the locations and latest downloads are stored.
The forecast script (for the block) generates messages
Warning: Trying to access array offset on null in
/var/www/vhosts/weerstationafferden.nl/httpdocs/pws-froggit/fct_darksky_shared.php on line 59
as does the load-files script with a PHP 500 error for the DarkSky forecast .
Please check your API-allowance with OpenWeather. Or remove the OpenWeather keys a.s.o. in your settings.
IMPORTANT Your other /pws/ website has the same problems with the DarkSky/OpenWeather forecast!
Now is it good.
I have try all solutions of you Wim and it is now working.
And darksky had a wrong api key.