There are multiple ways to run a cronjob in this case.
1: we define what should be run. Using the Leuven-Template the "job" to be executed is
http://www.your weather site.com/weather2/index2.php?mu=1
A "special version" of the main startpage should be run
=> just to discard all output and display a succes message and some time info
and use the command mu=1
=> tells the Curly / NWS scripts to load the latest warnings
2: we set the nocron to false in line 41 of the nws-alerts-config.php
From now on NO more updates every time a visitor comes to the website. There will only be updates if we use mu=1 on a start page.
3: We test by typing in the browser the normal website address with an extra mu=1:
http://www.your weather site.com/weather2/index.php?mu=1
There should be no errors.
4: We search for an inexpensive / free cron facility.
4.1 Use taskmanager on Windows or cronnix on a Mac. As the PC/Mac is running 24/24 that is a "no extra" costs choice.
4.2 To add more 24/7 availability one can use an external cronjob server
4.2.1 your own hoster, although most do not allow frequent (every 10 minutes) jobs
4.2.2 Companies like
cronjob-de
https://www.cronjob.de/preise.php free 1 job minimum 5 minutes between jobs or
setcronjob-com
https://www.setcronjob.com/prices free minimum 30 minutes, 10$/year minimum 2 minutes
Using such a company gives you often a log so you can check the history and for example see when the response times were not OK.
Datum: 02.05.2015, 10:56 Uhr
Ausgabe: succes, time spent in seconds: 0.30454802513123
Datum: 02.05.2015, 10:51 Uhr
Ausgabe: succes, time spent in seconds: 0.42925810813904
Datum: 02.05.2015, 10:46 Uhr
Ausgabe: succes, time spent in seconds: 2.7354168891907
off-topicAnother advantage of not using a subset of the main page but executing the complete index2/index.php: All other out of cache time files (forecast, Metar for current conditions, nightly almanac data, a.s.o. ) are loaded also. The next human visitor gets a better response this way.
Wim