Thanks for help, what do you think about this basic solution (any advice?):
HotKeySet("{ESC}", "ExitProgram")
Local $delay
Local $ret
Local $status
Local $next, $nday, $nhour, $nmin, $nsec
While 1
$ret = RunWait("s:\php\php.exe -f script.php", "s:\php\")
$status = "Last run: " & @HOUR & ":" & @MIN & ":" & @SEC & " Return: " & $ret
If ($ret=0) Then ; if no error in scripting, adding next run info to status
$delay = Random(3*1000, 6*1000, 1) ; delay to next run
$next = @HOUR*60*60 + @MIN*60 + @SEC + Round($delay/1000) ; calculating next run in HH:MM:SS format
$nday = Floor($next/86400)
$nhour = Floor($next/3600) - ($nday*24)
$nmin = Floor($next/60) - ($nday*1440) - ($nhour*60)
$nsec = Mod($next, 60)
;$nhour = Floor($next/3600);
;$nmin = Floor(Mod(($next/60),60));
;$nsec = Mod($next,60);
$status = $status & " Next run: " & StringFormat("%02d",$nhour) & ":" & StringFormat("%02d",$nmin) & ":" & StringFormat("%02d",$nsec)
EndIf
ToolTip($status, 0, 0) ; displaying status info
If ($ret<>0) Then ; if error in scripting, end program
MsgBox(0, "Warning", "Return code: " & $ret)
Exit
EndIf
Sleep($delay) ; waiting for next run
WEnd
Func ExitProgram() ; to terminating the program manually
Exit
EndFunc