In "Today" the data continues to be duplicated

Hello, about two years ago, I posted this same question and very kindly Mr. Wim took great care to fix it, but I didn’t find where I have the problem, few days ago, I renamed the old template on the server as “old” and installed the latest version, but the same thing still happens in “today” the data is logged correctly every 10 minutes, but… twice each time.
I send screenshot, and again request your attention to try to solve the problem.
Thanks a lot


This is the old and long discussion of the same problem. Data is recorded in duplicate
As discussed then, there is some program on your PC doing executing twice the same cron job every 10 minutes.

Please post a screenshot of your cron-settings, probably you are still using WD for that?

Wim

Good day, first of all thank you very much for your attention, I inform you of the changes I have made trying to solve this conflict.
It so happens that I have Weather Display, CumulusMX and Weatherlink working, well, seeing that with Weather Display it seems that it could be the source of the problem, last night I decided to change the configuration to use CumulusMX, obviously, I stopped using the Api of Weather Display, the cron that I do every 10 minutes I send it through the System Scheduler program, I send you two screenshots of the configuration, but it continues to do the same, it is also important to emphasize that two years ago when I reported this problem it was with another PC, this is new, had another Router, etc etc.
Muchas gracias

URL: Badalona (Barcelona) España Home Weather Station (cumulus version)


I ran the cron using my browser at 10:01 and 10:05 _test.php?test=PWS_cron_stationcron.php
When checking the data in the graph script view-source:Presión (hPa) hoy you see 4 lines between 10:00 and 10:06
First 10:01 is mine from the browser.
Next two lines are executed by your PC
Then one line at 10:05, that is from my browser.

=== How to solve this.
STEP 1: Remove the new cron setup in your system scheduler.

CHECK 1: After 1 hour check the graph in your dashboard. Are there items after you stopped or not?

Result: How many lines in the graph data for that hour:
1 line for that hour could be a test from someone
1 line / 10 minutes => there is another cron-server executing the cron-job

STEP 2: Completely switch off the PC for at least half an hour.

CHECK 2:After the that stop, check the graph in your dashboard. Are there items after you stopped or not?

Result: If there are still 1 or more items every ten minutes you maybe are using another cron-provider.
Maybe as a test a long time ago you setup a cron-job every 10 minutes with a free cron-server.
As you do not get invoices for that, some users forget tat they did that.

Or you setup a cron-job with your hosting provider, also no-invoice for that service.

Based on the results of these test we can look and find how this happens.
The solutions are very different for
=> “in-house” crons: weather-program, PC scheduler
=> crons from the outside world: cron server, hosting company a.s.o.


There was a period without any automated cron-jobs between 10:31 and 12:21

This is the data:

allLinesArray[115] = “9:41,18.6,1010.4,0,0,19,10,0,9.3,0,306,27 Sep,0,”;
allLinesArray[116] = “9:51,18.8,1010.4,0,0,23,0,0,9.5,0,0,27 Sep,0,”;
allLinesArray[117] = “9:51,18.8,1010.4,0,0,23,0,0,9.5,0,0,27 Sep,0,”;
allLinesArray[118] = “10:01,19.3,1010.5,0,0,19,0,0,9.5,0,0,27 Sep,0,”;
allLinesArray[119] = “10:01,19.3,1010.5,0,0,19,19,0,9.5,0,358,27 Sep,0,”;
allLinesArray[120] = “10:01,19.3,1010.5,0,0,19,19,0,9.5,0,358,27 Sep,0,”;
allLinesArray[121] = “10:05,19.3,1010.6,0,0,19,5,0,9.5,0,35,27 Sep,0,”;
allLinesArray[122] = “10:11,19.6,1010.9,0,0,19,13,0,9.5,0,339,27 Sep,0,”;
allLinesArray[123] = “10:11,19.6,1010.9,0,0,19,13,0,9.5,0,339,27 Sep,0,”;
allLinesArray[124] = “10:21,19.7,1010.8,0,0,18,0,0,9.5,0,0,27 Sep,0,”;
allLinesArray[125] = “10:21,19.7,1010.8,0,0,18,0,0,9.5,0,0,27 Sep,0,”;
allLinesArray[126] = “10:31,20.1,1010.9,0,0,19,0,0,9.3,0,0,27 Sep,0,”;
allLinesArray[127] = “10:31,20.1,1010.9,0,0,19,0,0,9.3,0,0,27 Sep,0,”;
allLinesArray[128] = “10:40,20.6,1010.9,0,0,14,0,0,9.2,0,0,27 Sep,0,”;
allLinesArray[129] = “10:40,20.6,1010.9,0,0,14,0,0,9.2,0,0,27 Sep,0,”;
allLinesArray[130] = “12:21,21.5,1011.1,0,0,13,0,0,11.2,0,0,27 Sep,0,”;
allLinesArray[131] = “12:21,21.5,1011.1,0,0,13,0,0,11.2,0,0,27 Sep,0,”;
allLinesArray[132] = “12:31,21.8,1011,0,0,11,0,0,10.6,0,0,27 Sep,0,”;
allLinesArray[133] = “12:31,21.8,1011,0,0,11,0,0,10.6,0,0,27 Sep,0,”;

The 10:40 lines where two runs from the browser as a test.

What did you do:

  1. switch off the PC ?
  2. switch off system scheduler ?
  3. switch of one cron-job to your website ?

Wim

Hi, with the programmer stopped, keep duplicating the two log lines.
With the PC and everything stopped, no line is generated.
When I reconnect the PC, without the cron scheduler running, the two lines continue to be recorded.
Conclusion something in my PC is not right, but I don’t know how to fix it.

The PC was turned off at 10:45
PC booted up at 12:20, without cron scheduler
Data was recorded without my program’s cron, and is still being recorded.
Total mystery

How to solve it:

  1. Rename three w34 scripts so that they can not be used
    w34_cron_stationcron.php => xxx.txt
    w34_cron_empty.php => yyy.txt
    w34_cron_addtoyear.php => zzz.txt

  2. duplicate PWS_cron_stationcron.php and name it XXX_cron_stationcron.php where you replace XXX with three normal alphabetic characters

  3. after that, rename PWS_cron_stationcron.php => xyz.txt

===

Now change the scheduler entry on two places
a. change the PWS_. . name to the new name from point 2 above.
b. replace the current 10 minutes setting with a list of minutes to run 05,15,25,35,45,55

So now there should be only new line with 05, 15 and so on.

If it are two entries then we know for sure that system scheduler is started twice.
That sometimes happens, one copy is running with system/admin privileges, one copy as a user job.

Wim


Hello again, I have made the changes, which you indicated and the script has been renamed as “PQR_cron_stationcron.php” on the server it is updated correctly, but not in “today” of “chartsmydata” the cron is executed at 05.15, 25 etc

looks like it’s fixed

Manually running works OK and adds 1 line to the file. => OK

Did you change the cron-server lines correctly in the system scheduler? Please post a screenshot.
We have to wait until 14:35 / 14:45 a.s.o. to see if it ran and if it runs only once.

Wim

No, see previous message.
We need to have lines at 14:35 45 55 a.s.o.
Other lines are manual tests.

OK


I do not think the , should be there after 55
change it and see if that solves the not running of the script.


Ok, changed

It seems that the script does not work.

Too bad we can’t see each other remotely

At least we get rid of the twice every 10 minute runs.
Just test the System Scheduler, check their documentation a.s.o.
If that does not work:
Try a free cron service such as
https://cron-job.org/en/

Probably there are others also with other languages then English or German

Wim

Dear Wim, as long as it can’t be solved, for the moment I have returned to the established configuration, for the moment it is working.

Hello, after many tests and the great help of Wim, I have managed to solve the problem of duplication of lines in the cron, now my question is about the way in which the data is stored in the “Today” file of which I send a screenshot, just to see if the information that appears is normal.