Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Extra web files end of day timing

From Cumulus MX version 3 build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since, and has recently released Cumulus MX version 4. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

broadstairs
Posts: 1184
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW2000/GW3000
Operating System: Linux openSUSE LEAP
Location: Broadstairs, Kent, UK
Contact:

Re: Extra web files end of day timing

Post by broadstairs »

water01 wrote: Tue 06 Aug 2024 9:49 am It is created by CMX. Again have you checked the uploaded file, I have and it is correct?
Yes that I'd expect.

However I have to create my file after the dayfile has been updated by CMX at rollover and so I cannot start extracting data until after rollover which means that the first upload has already happened before I can create the file containing the extracted data! The rollover and first upload happens within less than 2 seconds after midnight as I discovered by checking the log. I have to run my extract as a cron job so that is only on the minute so if I run it at 1 minute past midnight I am already about 58 seconds too late!

Stuart
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Extra web files end of day timing

Post by freddie »

If you set your cron job to run at midnight and have a sleep command as the first statement, you can delay execution by x seconds. If that is what you are trying to do - it isn't entirely clear from your description. Like this:

Code: Select all

!#/bin/bash
sleep(5)
/your/script.sh
Freddie
Image
broadstairs
Posts: 1184
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW2000/GW3000
Operating System: Linux openSUSE LEAP
Location: Broadstairs, Kent, UK
Contact:

Re: Extra web files end of day timing

Post by broadstairs »

freddie wrote: Tue 06 Aug 2024 10:22 am If you set your cron job to run at midnight and have a sleep command as the first statement, you can delay execution by x seconds. If that is what you are trying to do - it isn't entirely clear from your description. Like this:

Code: Select all

!#/bin/bash
sleep(5)
/your/script.sh
Yes I know I could do that but the rollover and first upload both happen within 1.2 seconds after midnight!

Stuart
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Extra web files end of day timing

Post by freddie »

I've just re-read the thread and I don't think you can use EOD upload. You're running a script that requires the EOD content to be present in the dayfile, and the result of that script is a file that you would like transferred in the EOD upload.

That's like a self-induced race condition. Sometimes it may work but I wouldn't want to rely on it.
Freddie
Image
broadstairs
Posts: 1184
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW2000/GW3000
Operating System: Linux openSUSE LEAP
Location: Broadstairs, Kent, UK
Contact:

Re: Extra web files end of day timing

Post by broadstairs »

freddie wrote: Tue 06 Aug 2024 11:30 am I've just re-read the thread and I don't think you can use EOD upload. You're running a script that requires the EOD content to be present in the dayfile, and the result of that script is a file that you would like transferred in the EOD upload.

That's like a self-induced race condition. Sometimes it may work but I wouldn't want to rely on it.
That's exactly what I believe so for now I've modified my script to do the create and upload, but I do need to find a Linux commandline FTP client which will support more than plain old FTP.

Stuart
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
User avatar
rogerthn
Posts: 547
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

Re: Extra web files end of day timing

Post by rogerthn »

broadstairs wrote: Tue 06 Aug 2024 12:00 pm ... but I do need to find a Linux commandline FTP client which will support more than plain old FTP.

Stuart
I would try lftp.
Image
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Extra web files end of day timing

Post by freddie »

sftp is in most distros. Or there's always scp. Or even rsync which will just transfer the delta if you're interested in saving bandwidth.
Freddie
Image
Post Reply