How can the ftp transfer be influenced?

89 views
Skip to first unread message

Geni

unread,
Jan 20, 2020, 7:38:29 AM1/20/20
to weewx-user
A cronjob fetches every 10 min a status.jpg of an external website and stores it in the HTML_ROOT/meteo.
Target the file in this folder should always be copied with the ftp to the configured server and its path.
This almost always works now but sometimes nothing is copied for 1 or 2 hours and suddenly it works again.

Can or must I make an entry in the weewx.conf to make this work more reliable?

Geni

Andrew Milner

unread,
Jan 20, 2020, 8:22:01 AM1/20/20
to weewx-user
what error messages are in the log for the times when ftp appears to be failing??

Geni

unread,
Jan 20, 2020, 9:05:45 AM1/20/20
to weewx-user
No error is entered in syslog

Andrew Milner

unread,
Jan 20, 2020, 9:43:16 AM1/20/20
to weewx-user
have you run with debug turned on?

the 'fault' could be something happening at the other end - ie weewx may be transferring correctly and your ISP may be doing something odd.

Geni

unread,
Jan 20, 2020, 12:46:21 PM1/20/20
to weewx-user
In my opinion there are no errors in the log.

It's about the image uwz.png, this is fetched every 10 minutes around X9.
But in the attached log it was only transferred once via ftp.
log1.txt

rich T

unread,
Jan 20, 2020, 1:32:27 PM1/20/20
to weewx-user
Try setting CopyGenerator to copy the file every time you upload.

In the skin.conf file:

[CopyGenerator]
   
    # This section is used by the generator CopyGenerator
    # List of files to be copied only the first time the generator runs
    copy_once = favicon.ico, images/*, json/index.html, js/index.html, js/responsive-menu.js, robots.txt
   
    # List of files to be copied each time the generator runs
    copy_always = *.css, status.jpg

Geni

unread,
Jan 21, 2020, 6:37:02 AM1/21/20
to weewx-user
This is what I was looking for, unfortunately this does not work.
At Jan 21 12:19:01 a new version was fetched, but it was not copied to Jan 21 12:20:26
List2.txt

Thomas Keffer

unread,
Jan 21, 2020, 8:59:25 AM1/21/20
to weewx-user
The FTP uploader includes an algorithm to avoid unnecessary uploads. If the timestamp on the file has not changes since the last upload, it does not upload the file.

I suspect that your cron job is not "refreshing" the timestamp. 

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/73ad19b6-ca6c-408a-85d8-a9396b471e76%40googlegroups.com.

Ryan Kramer

unread,
Jan 21, 2020, 11:04:09 AM1/21/20
to weewx-user
if at all possible, use SSH + rsync.  Far better way of transferring and much more reliable.
Reply all
Reply to author
Forward
0 new messages