Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: timewait timejulianday
In the old days, WinBatch did not have a timer. WinBatch emulated such by closely watching the system time and zeroing in on the desired time param1 is the variable that contains the desired time in this format: hh:mm. ten thirty o'clock PM is 22:30.
You also use WinBatch to launch a third party schedule. The scheduler which comes with Norton Anti-Virus for Win95 works fine with Winbatch. And Clockman also works well.
;;This script will launch a program at a specified time ;;on a certain day of the week. ;Incontrol 12 is used to direct WIL and it's parent application ;(if the parent application supports this function) ;as to how to handle users either terminating WinBatch ;via the "Ctrl-Break" keystroke sequence or perhaps a menu item, ;or by simply exiting windows. Intcontrol(12,9,0,0,0) while 1 ttt="0000:00:00:18:00:00"; 6 PM TimeWait(ttt);Waits for 6 PM a=TimeYmdHms() b=TimeJulianDay(a) c=(b+5) mod 7 day=ItemExtract(c+1, "Sun Mon Tue Wed Thu Fri Sat", " ") If day=="Thu"; Checks to see if it's Thursday run("yourprog.exe","") Endif Timedelay(10) endwhile
;Assuming you want to run a job M-F at 11 pm ;First wait for 11 pm while 1 ttt="0000:00:00:23:00:00" TimeWait(ttt) ;now see if it is m-f a=TimeYmdHms() b=TimeJulianDay(a) c=(b+5) mod 7 if (c==0) || (c==6) then continue ; if the day if Sunday or Saturday, then transfer control back to while loop for re-eval run("yourjob.exe","") TimeDelay(60) endwhile
Article ID: W13881
Filename: Scheduling with the TimeWait Function.txt
File Created: 2000:11:17:11:30:34
Last Updated: 2000:11:17:11:30:34