Page 1 of 1

Close Applcation At Midnight

Posted: Mon Aug 27, 2012 8:42 pm
by floebel
I want to do database maintenance after midnight. Is there a way to close all harbour applications still running at midnight? What would the source code look like?

Thanks
Fulton Loebel

Re: Close Applcation At Midnight

Posted: Tue Aug 28, 2012 7:41 pm
by mosh1
May you can use TIMER?

Re: Close Applcation At Midnight

Posted: Thu Aug 30, 2012 1:21 pm
by Franklin Demont
I use :

DEFINE TIMER oOut INTERVAL 59*60000 OF oWnd ;
ACTION iif( LEFT(Time(),2)=="00" , ( set(_SET_ERRORLOG ,"Autoclose.log") , tracelog( DTOC(Date()) + " , Programma closed , user " + UPPER(NetName(.T.)) ) , oWnd:END() ) , )


Frank