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

Help with Cron Job and ImportCumulusFile script

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Help with Cron Job and ImportCumulusFile script

Post by water01 »

A direct link to your Cpanel page will not work the URL fails because we are not logged in.

Copy and paste the command line from the Cpanel page into the Forum posting window.
David
Image
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Help with Cron Job and ImportCumulusFile script

Post by mm23 »

I have no command line from the Cpanel page. The command line I sent is from my Cumulus toolbox and works fine
Image
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: Help with Cron Job and ImportCumulusFile script

Post by mcrossley »

But you said you had tried a few command line options that produced error messages?

Using a url in a PHP command line will not work, you have to use the command line format that is documented in the import file...
// COMMAND LINE
// It is also possible to run this script from a PHP command line, eg via a cron job in Linux, or a scheduled task in Windows.
// Example of a 'Windows' command line...
// php importcumulusfile.php file=realtime.txt table=Realtime type=realtime key=letmein retainVal=48 retainUnit=hour
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Help with Cron Job and ImportCumulusFile script

Post by mm23 »

I thought to execute command line every minute and I think it would be easiest with the cron job. So far Cumulus toolbox did It from my cumulus computer but it is possible to do only once per hour
Image
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: Help with Cron Job and ImportCumulusFile script

Post by mm23 »

Here is the answer on my question:

php -q /home/yourusername/public_html/yourdomain.com/....path to importcumulfile.php/importcumulusfile.php type=realtime key=youruniquekey table=realtime file=realtime.txt retainVal=2 retainUnit=day

...with or without retain unit and value. In my case retains mean that my table will retain only data for last two days
As I said you can use this command for Cpanel cron job to import data from your realtime.txt file into a realtime table
Image
Post Reply