Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Help with Cron Job and ImportCumulusFile script
Moderator: daj
-
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Help with Cron Job and ImportCumulusFile script
Hi All,
I've taken the plunge into mysql databases and have been able to import the dayfile.txt file using the ImportCumulusFile script in the wiki. I've been able to see some data using Kerry's (tobyspond) samples. I already upload the dayfile.txt file to my server using cumulus toolbox just after midnight each day. The script says It's possible to run this script from a PHP command line, eg via a cron job.....but this is where I'm stuck.
I've tried to using cPanel to create a cron job but nothing happens. Although I've searched the forum and have googled, I'm lost when it comes to creating a cron job to import the dayfile.txt into the database once a day. Any help with this will be much appreciated.
I've taken the plunge into mysql databases and have been able to import the dayfile.txt file using the ImportCumulusFile script in the wiki. I've been able to see some data using Kerry's (tobyspond) samples. I already upload the dayfile.txt file to my server using cumulus toolbox just after midnight each day. The script says It's possible to run this script from a PHP command line, eg via a cron job.....but this is where I'm stuck.
I've tried to using cPanel to create a cron job but nothing happens. Although I've searched the forum and have googled, I'm lost when it comes to creating a cron job to import the dayfile.txt into the database once a day. Any help with this will be much appreciated.
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
- mcrossley
- Posts: 12763
- 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
Dan, what command line and parameters are you putting into the cron job?
-
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Re: Help with Cron Job and ImportCumulusFile script
Hi Mark,
This is what I have....
Set for 10 mins past midnight once a day (but for testing every minute). I've included my email address as part of the cron setup set up but haven't rec'd one saying it has executed successfully.
Thanks heaps.
This is what I have....
Code: Select all
wget http://www.brisbaneliveweather.com/ImportCumulusFile.php?type=Dayfile&key=******&table=Dayfile&file=dayfile.txt
Set for 10 mins past midnight once a day (but for testing every minute). I've included my email address as part of the cron setup set up but haven't rec'd one saying it has executed successfully.
Thanks heaps.
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
- mcrossley
- Posts: 12763
- 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
OK a couple of things...
Are you using a commercial hosting system or self hosting?
Is wget available on your web server? (can you SSH onto the server and run the command?)
Is the web page you are trying to call on the same server as the cron job?
Have you tried running php directly rather usng wget?
Are you using a commercial hosting system or self hosting?
Is wget available on your web server? (can you SSH onto the server and run the command?)
Is the web page you are trying to call on the same server as the cron job?
Have you tried running php directly rather usng wget?
-
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Re: Help with Cron Job and ImportCumulusFile script
Thanks again...
Are you using a commercial hosting system or self hosting? - Commercial host
Is wget available on your web server? (can you SSH onto the server and run the command?) - Ummm not sure. I'm not familiar with this
Is the web page you are trying to call on the same server as the cron job? - Yes, its in the public_html folder
Have you tried running php directly rather usng wget - yes - without success
cheers
Are you using a commercial hosting system or self hosting? - Commercial host
Is wget available on your web server? (can you SSH onto the server and run the command?) - Ummm not sure. I'm not familiar with this
Is the web page you are trying to call on the same server as the cron job? - Yes, its in the public_html folder
Have you tried running php directly rather usng wget - yes - without success
cheers
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
-
- Posts: 272
- Joined: Tue 28 May 2013 1:06 am
- Weather Station: Davis VP2 Plus
- Operating System: Raspian Buster (RPi 3b)
- Location: Tulsa, OK
Re: Help with Cron Job and ImportCumulusFile script
Very few commercial hosters right now allow SSH because they feel it gives users too much control over the system. Bluehost, however, does, and it's a must for me. I believe Dreamhost does as well. Not sure about your host, however, as you've not named it.captzero wrote:Thanks again...
Are you using a commercial hosting system or self hosting? - Commercial host
Is wget available on your web server? (can you SSH onto the server and run the command?) - Ummm not sure. I'm not familiar with this
Is the web page you are trying to call on the same server as the cron job? - Yes, its in the public_html folder
Have you tried running php directly rather usng wget - yes - without success
cheers
-
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Re: Help with Cron Job and ImportCumulusFile script
Thanks,
My host allows SSH but I'm not familiar with how to use it. I'll brush up on it.
My host allows SSH but I'm not familiar with how to use it. I'll brush up on it.
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
-
- Posts: 272
- Joined: Tue 28 May 2013 1:06 am
- Weather Station: Davis VP2 Plus
- Operating System: Raspian Buster (RPi 3b)
- Location: Tulsa, OK
Re: Help with Cron Job and ImportCumulusFile script
once you get in using SSH, issue the following commands:captzero wrote:Thanks,
My host allows SSH but I'm not familiar with how to use it. I'll brush up on it.
which wget
which php
Look at the output of both; they'll likely be something like '/usr/bin/wget' and '/usr/bin/php'. This essentially just lets you know where those binaries are so you can execute them via cron. I've found that on some installs the full path to the executable is required. Why, I am unsure of.
-
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Re: Help with Cron Job and ImportCumulusFile script
Thanks again, I'll have a play over the next couple of days and let you know how I go.
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
-
- Posts: 363
- Joined: Wed 03 Mar 2010 10:20 am
- Weather Station: Vantage Pro2 w/ daytime FARS
- Operating System: Windows 10
- Location: Brisbane, Australia
- Contact:
Re: Help with Cron Job and ImportCumulusFile script
Sorted. I was able to achieve this as a remote command using cumulus toolbox.
Dan
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
http://www.brisbaneliveweather.com
A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
-
- 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
Somebody help me , please.
I need a command line for cron job to fill my realtime table using importcumusfile php. and realtime.txt in data folder. Now I am still using toolbox and importcumulus.php and everything works well, but I have a wish to fill my table every minute using cron job.
Thanks a lot
I need a command line for cron job to fill my realtime table using importcumusfile php. and realtime.txt in data folder. Now I am still using toolbox and importcumulus.php and everything works well, but I have a wish to fill my table every minute using cron job.
Thanks a lot
-
- Posts: 3253
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Help with Cron Job and ImportCumulusFile script
Does your hosting service provide you with CPanel access, because if it does you set up Cron Jobs via Cpanel.
-
- 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
Yes, I have access to cpanel. When I asked the web hosting admin the same question I got the answer that I write next:
php -q /home/username/public_html/path_to_script
but something is missing because I always get the various error message depends of a command line content i wrote?
php -q /home/username/public_html/path_to_script
but something is missing because I always get the various error message depends of a command line content i wrote?
- mcrossley
- Posts: 12763
- 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
Can you post the command line you used?