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

Run remote page as "External programs"

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
User avatar
JacquesD
Posts: 609
Joined: Tue 27 Jul 2010 3:51 am
Weather Station: National Geographic 265nc
Operating System: XP SP3
Location: St-Ours, Québec, Canada
Contact:

Run remote page as "External programs"

Post by JacquesD »

Hi,

I'm about to play with idea to avoid Cron job for website updates
and I'm curious about "External programs" feature. So, are we able
to launch a web page as an "External program"?

Example, to stay-in-touch with realtime.txt updates, I could have a page
to process it on website as soon as it arrive, with something like:
http://mysite.com/Read_RealTime_file.php

So, is this possible or maybe an other way?

Thanks in advance,
Jacques
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Run remote page as "External programs"

Post by steve »

You can do it using wget as the command
Steve
User avatar
gluepack
Posts: 460
Joined: Tue 22 Jan 2013 9:20 pm
Weather Station: PCE-FWS 20
Operating System: Win 7 Pro
Location: Zlatina, Bulgaria

Re: Run remote page as "External programs"

Post by gluepack »

Well, not understanding Steve's response (my problem), I don't know if it is overkill or not but all browsers can be invoked from the command line so you can run it (or a batch file to invoke it) from "external program".

So, your web page can be the start page and it can be a php script.

The only problem is that not all browsers permit closing, without human interaction, and those that do use different techniques e.g. I believe you can use javascript with IE but not Firefox, although there is a setting in the latter that enables you to accomplish it in a different way.

I am not an expert by any means but you can Google, like I did, " automatically close browser", or something similar, and, separating the wheat from the chaff, you may come across a suitable technique.

Obviously, as you are only using it as a tool to run a php script, it doesn't have to be your favorite browser or even a mainstream one.

Or... use wget ;)
Image

PWS links: WundergroundIVARNAPR3CWOP/APRSE(W)2048PWSWeatherZLATINABGAwekas10631Twitter@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Run remote page as "External programs"

Post by laulau »

Hi,

did someone run a php script successfully using wget ?

Thanks in advance
Laurent

Image
BigOkie
Posts: 283
Joined: Tue 28 May 2013 1:06 am
Weather Station: Davis VP2 Plus
Operating System: Raspian Bookworm (RPi 3b)
Location: Tulsa, OK

Re: Run remote page as "External programs"

Post by BigOkie »

laulau wrote:Hi,

did someone run a php script successfully using wget ?

Thanks in advance
I have, sometime ago. It can also be done with curl, of which both have ports for Windows.
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Run remote page as "External programs"

Post by laulau »

Perhaps a command line example with wget running a php script on a remote sever ?
(i like to use http://wiki.sandaysoft.com/a/ImportCumulusFile to populate my realtime database on the server)
Laurent

Image
User avatar
JacquesD
Posts: 609
Joined: Tue 27 Jul 2010 3:51 am
Weather Station: National Geographic 265nc
Operating System: XP SP3
Location: St-Ours, Québec, Canada
Contact:

Re: Run remote page as "External programs"

Post by JacquesD »

Hi,

As I always want simple things (for Dummies), I wanted something
to suit my habits for "Throw all in the folder and Run" projects.

So, VBS is available on all Windows system via the little utility file; cscript
Then, only a few lines is needed to launch a page via a browser:
(I used Internet Explorer as it is included in each Pc... please no tomatoes! :lol: )

Code: Select all

' Jacques DesRoches (c) Weatherbyyou.com 2013
' Script to run a webpage, like a Cron job on Linux system
' Only provide URL you want to be executed
' Launch with command: cscript.exe "C:\MyPath\LaunchPage.vbs"
Option Explicit
Dim objIEA
Set objIEA = CreateObject("InternetExplorer.Application")
objIEA.Navigate "http://weatherbyyou.com//ss_nature.php"
objIEA.visible = true
While objIEA.Busy
Wend
objIEA.Quit
Set objIEA = Nothing
Copy these line to your favorite editor and name it LaunchPage.vbs
Simply change link http://weatherbyyou.com//ss_nature.php, for yours.

That way, we just have to invoke it with one line:
cscript.exe "C:\MyPath\LaunchPage.vbs"

This could be used at DOS Prompt to see (Very briefly!) that things works
When verified, you could use it in plain "Windows Task Scheduler" to mimic
a "Cron job" if your provider don't support Cron (or just mixed with these stars
command: "5 * * * * myApp") .... or use in Cumulus:

Program: cscript.exe
params: C:\MyPath\LaunchPage.vbs

Then, I'll include it in current "Smokey Bear" project
(eliminate need to use 3rd party live program to produce Fire Indexes)
... but for now if someone would play with it!

Regards,
Jacques
Image
Post Reply