NOTE: For configuration of the cron job for version 7 or higher of Zap Weather, refer to the Zap Weather installation instructions

README file for Z Weather's cron job feature
Version: Version 6 Beta 4, July 2008
For the latest information, visit www.zcontent.net

Note: Version 6 Beta 4 or higher versions of the Z Weather component must be installed in order to use this cron job program (the Z Weather module is not required in order to use this program). Previous versions of cron job will not work with version 6.  This cron job is compatible with both Joomla 1.0 and Joomla 1.5 installations of Z Weather.

Cron jobs allow programs to run in the background without user interaction. When used with Z Weather, a cron job can update the weather data used by Z Weather in the background, which normally would be initiated by user browsing your web site.  This results in faster loading pages, since the user's browser no longer initiates the weather data update.  Not all web hosting providers support the use of cron jobs. Check with your provider.  The "cronzweather" script is used for the cron job.  Copy this script to a directory on your server. If possible, it should be in a folder separate from your web site.  Make sure the permissions allow you to execute the script.  The syntax for using this script is:

/path_to_file/cronzweather http://yoursite.com

Change the "yoursite.com" to your website URL that has Z Weather installed.  If you have more than one site using Z Weather, you can add sites to the command line to include them in the cron job.  This is the command that will be run from the crontab file, but it can also be executed manually from a command line for testing purposes, however, not all web hosting sites allow command line access. 

From the Joomla administrator, open the Z Weather screen and click the global settings button to modify the following settings:

- Cache Refresh Mode: change to "Background cache refresh (cron)". Use the other option to disable cron from updating the cache.

- Cron IP Address: use the default "127.0.0.1" address unless your cron job is running on a server different from your web server.

Your cron job interval should be set to the shortest cache timeout specified in the global settings. For example, if the alert cache timeout is 10 minutes, then the cron job interval should be 10 minutes. Other cache timeout settings should be in multiples of this interval.  Some web hosting sites may limit the frequency a cron job can run during the day.

After saving your global settings and enabling your cron job, wait for 10 minutes (or whatever the cron job interval is), then refresh or go to the Z Weather administrator screen. If you see the text:

    Cache was last updated by local cron job x minutes ago

Then the cron job is operating successfully.


Troubleshooting:

Make sure your cron job script is a Unix text file, not a PC text file. PC text files can produce errors when used as scripts.

If this script is used to update multiple Joomla sites, make sure ALL sites are running Z Weather version 6.4 Beta or higher.

** Release History

29, July, 2008 (6 Beta 4) - Added version 6 support, cron job can now run on a host other than the web server and update the Z Weather data on multiple servers.

5 May, 2006 (Beta 5) - Added code to check for new frontendrefresh option

12 December, 2005 (Beta 3) - The cron job can now create the cached HTML files used by Z Weather

November, 2005 - initial release of cron job program