Hi
Not tested below code; but I would run interval at say 1 minute or less, even every seconds should have no impact and record when the last backup was successful and check from there.
var my_backup_schedular_is_backing_up_data:boolean;
last_run_date:TDateTime=0;
hrs,mins,sec,msec:word;
backup_was_successfull:boolean=false; // set this to true if backup of data completed without error;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
// check if backing up data;
If my_backup_schedular_is_backing_up_data then exit;
// now check if backup has already been run today
if date<>last_run_date then
begin
// the date is new so now check if its the correct time to start a backup
decodetime(time,hrs,mins,sec,msec);
if hrs=1 then
begin
my_backup_schedular_is_backing_up_data:=true; // stop timer re-entering
// so its a new date and its 1 oclock
// do my data backup stuff
.. set backup_was_successfull to true if backup completed without error
// set last_run_date to todays date if backup successful
if backup_was_successfull then last_run_date:=date; // if failed then it will retry until its not 1am
my_backup_schedular_is_backing_up_data:=false; // allow backup to start again.
end;
end;
end;