I am trying to write a script that will tell someone when the last time they did a Script settings backup Everything works great but I would like to be able to take the HRS section below and get the Days and hours when the hours go over 24 but are less then 7 days. can anyone help?
timecheck {
;Check to see if there has ever been a backup done
!if ($isdir(c:\circcbak)) {
;Check when last backup was done
Set %backup_calc $calc($ctime - $rgc_settingsR(Backup, date))
;Backup Should be done at least every 15 days.
if (%backup_calc > 12962000) {
backup_check
}
;Was it hours ago
elseif (%backup_calc > 3600) {
echo -a your settings where last backed up $round($calc(%backup_calc / 3600),1) hrs ago | Return
}
;was it only min ago
else echo -a your settings where last backed up $round($calc(%backup_calc / 60),1) min ago | Return
}
else backup_check
}
Last edited by LittleJohn; 01/10/07 04:39 PM.