The saveYesterday.php is fairly simple minded
<?php
# saveYesterday script should be run via cron hourly at 58 after the hour.
# it will only do saving of the 'yesterday' value if the local time hour is 23
#
# Version 1.00 - 26-Feb-2018 - initial release
#
if(file_exists("Settings.php")) {
include_once("Settings.php");
date_default_timezone_set($SITE['tz']);
$Hnow = date('H');
$doitAnyway = isset($_GET['force'])?true:false;
if($Hnow == '23' or $doitAnyway) {
#$tstamp = date('Y-m-d H:i:s T');
#echo "saveYesterday.php local time is $tstamp\n";
$saveYesterday = true;
include_once("AWNtags.php");
return;
} else {
#echo "saveYesterday.php $tstamp notice: Hour=$Hnow is not = 23 .. not running the save.\n";
return;
}
} else {
echo "saveYesterday.php Warning: no Settings.php found.\n";
}
?>
and shouldn't need any changes to it. The timezone comes from Settings.php setting. I think what you need to do is change the command from
59 23 * * * /usr/bin/php -q $HOME/public_html/saveYesterday.php >/dev/null 2>&1
to
59 * * * * cd $HOME/public_html;/usr/bin/php -q saveYesterday.php >/dev/null 2>&1
so it runs every hour. It will only save the values when LOCAL time is 23:59, otherwise it just quietly exits.
On most webservers, the local time is usually UTC (for convenience of the logs/sysadmins) and cron time may not match your timezone setting at all. That's why running saveYesterday every hour is recommended.
Ed.. I'd reversed the cron time specs..
