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

NOAA-reports

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

User avatar
rogerthn
Posts: 549
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: NOAA-reports

Post by rogerthn »

cp -v /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago" +%m%d).txt /var/www/NOAA-reports > /tmp/NOAA-reports.log 2>&1
richard_newberry wrote:No nothing is in /tmp/NOAA-reports.log it's like it doesn't execute in cron under user cumulus

but If I do it when I login as cumulus and put the command in without @daily it works but in the /tmp/NOAA-reports.log it's got weird characters in it as shown in the post previous.
Try

Code: Select all

crontab -e
as pi and add

Code: Select all

1 2 * * * cp -v /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago" +%m%y).txt /var/www/NOAA-reports > /tmp/NOAA-reports.log 2>&1
This should copy the file at 1 minute past 2 (AM) every day, change 2 to whatever to copy at a different time.
i.e. if cron is running, check with

Code: Select all

sudo /etc/init.d/cron status
Image
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: NOAA-reports

Post by richard_newberry »

Still didnt execute. Hmmm
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
rogerthn
Posts: 549
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: NOAA-reports

Post by rogerthn »

Yes, Hmmm!

And

Code: Select all

sudo /etc/init.d/cron status
say

Code: Select all

[ ok ] cron is running.
?
Image
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: NOAA-reports

Post by richard_newberry »

cumulus@debian:~$ /etc/init.d/cron status
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled)
Active: active (running) since Wed 2016-05-04 22:22:02 BST; 2 days ago
Docs: man:cron(8)
Main PID: 17634 (cron)
CGroup: /system.slice/cron.service
├─ 1017 ./eggdrop BanditBot.conf
├─ 8998 /usr/bin/atop -a -w /var/log/atop/atop_20160506 600
└─17634 /usr/sbin/cron -f

All it says

I will see if it works under root.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
rogerthn
Posts: 549
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: NOAA-reports

Post by rogerthn »

Even if "my" command was
sudo /etc/init.d/cron status
this is Strange

Do you get an update of /tmp/date.log once every minute with a line as below added with crontab -e?

Code: Select all

* * * * * echo $(date) > /tmp/date.log 2>&1
Image
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: NOAA-reports

Post by richard_newberry »

That works date.log is in /tmp every minute.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: NOAA-reports

Post by richard_newberry »

cp -v /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago" +%m%y).txt /var/www/NOAA-reports > /tmp/NOAA-reports.log 2>&1

error message: cp: target ‘+’ is not a directory
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
rogerthn
Posts: 549
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: NOAA-reports

Post by rogerthn »

WTH
Can you please show the result from

Code: Select all

echo /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago" +%m%y).txt

Code: Select all

ls /var/www/NOAA-reports
AND

Code: Select all

crontab -l
Image
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: NOAA-reports

Post by richard_newberry »

echo /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago" +%m%y).txt
/home/cumulus/CumulusMX/Reports/NOAAMO0516.txt

ls /var/www/NOAA-reports
NOAAMO0116.txt NOAAMO0216.txt NOAAMO0316.txt NOAAMO0416.txt NOAAMO0516.txt NOAAYR2016.txt

crontab -l
10 0 * * * cp -v /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago") +%m%y).txt /var/www/NOAA-reports > /tmp/NOAA-reports.log 2>&1
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: NOAA-reports

Post by mcrossley »

doesn't the cron entry need to be a shell script so the date substitution works?
richard_newberry
Posts: 500
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: NOAA-reports

Post by richard_newberry »

mcrossley wrote:doesn't the cron entry need to be a shell script so the date substitution works?
What do you suggest the script should be
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
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: NOAA-reports

Post by freddie »

richard_newberry wrote:
mcrossley wrote:doesn't the cron entry need to be a shell script so the date substitution works?
What do you suggest the script should be

Code: Select all

#!/bin/sh
cp -v /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago") +%m%y).txt /var/www/NOAA-reports
Freddie
Image
User avatar
rogerthn
Posts: 549
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: NOAA-reports

Post by rogerthn »

richard_newberry wrote:echo /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago" +%m%y).txt
/home/cumulus/CumulusMX/Reports/NOAAMO0516.txt

ls /var/www/NOAA-reports
NOAAMO0116.txt NOAAMO0216.txt NOAAMO0316.txt NOAAMO0416.txt NOAAMO0516.txt NOAAYR2016.txt

crontab -l
10 0 * * * cp -v /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago") +%m%y).txt /var/www/NOAA-reports > /tmp/NOAA-reports.log 2>&1
There seems to be an extra ) in crontab, one after "1 days ago" and one after +%m%y
Try to remove the first?
Image
User avatar
rogerthn
Posts: 549
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: NOAA-reports

Post by rogerthn »

The extra ) is not all :mrgreen:
Try as below

Code: Select all

10 0 * * * cp -v /home/cumulus/CumulusMX/Reports/NOAAMO$(date --date="1 days ago" +"\%m\%y").txt /var/www/NOAA-reports > /tmp/NOAA-reports.log 2>&1
Image
Locked