Automatically Updating All Profiles

The “updateall.php” command line script allows you to automatically update all logaholic profiles at once from a single command. The update script is located in the following directory:

logaholic/components/MaintenanceScripts/updateall-example.php


Edit the script to add an admin email address if you wish to be notified via email each time the script runs.


Rename the updateall-example.php script to updateall.php to use it.

This script should only be started from the command line and will update statistics for all profiles in your system.

Usage:

php -q updateall.php

Example: In a scheduled cron job, this command can be set up to run every hour at minute 55 like this:

55 * * * * cd /path_to_your_logaholic/;php -q updateall.php -email

Options:

This will email a summary status of each updated profile to the admin.

php -q updateall.php -email

This will only email if there were problems with one or more profiles that could not be updated.

php -q updateall.php -emailproblems

This will reset the ‘profilename’ running status to ‘no.’

php -q updateall.php -reset profilename


When running on Windows, edit the script to point to the correct location (path) for your PHP executable (e.g., C:\PHP\php-cgi.exe)


Related Topics: