Schedule to run every hour
Keywords: Schedule run every hour
Question:
I need to execute a couple different applications in order, every hour. Does Winbatch have to ability to schedule itself?Answer:
Yes, You can use the TimeWait function to help schedule a task every hour. Here is some sample code....IntControl(12,9,0,0,0) ;refuse to terminate WB; allow Windows termination quietly TimeToWait = "0000:00:00:01:00:00" ; 1 hour While 1 ; do forever Message("","Add Your code Here") ;RunWait(app1,"") ;RunWait(app2,"") ;RunWait(app3,"") ;Get Current time Now=TimeYmdHms( ) ;Add an hour to the current time HourLater = TimeAdd(Now,TimeToWait) ;Wait an hour TimeWait(HourLater) endwhile
Article ID: W14980