WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: marcozatta on July 22, 2014, 06:31:16 PM

Title: Running a script at certain times of day
Post by: marcozatta on July 22, 2014, 06:31:16 PM
How do I insert what time I want a particular script to run?
Title: Re: Running a script at certain times of day
Post by: etippelt on July 23, 2014, 02:57:52 AM
If you want to run the script from an external resource, then the windows scheduler would be my first thought.

If you want to run the script but make it wait for a certain date and time to execute, then I would just put a loop at the beginning of the program that reads the date and time and compares it with your specified start time.
Title: Re: Running a script at certain times of day
Post by: Deana on July 23, 2014, 09:09:49 AM
Yes. I also recommend using the Windows Scheduler to schedule the task.  Otherwise have the script run at login and use TimeWait to wait for the specified hours: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/Time~-~Timer~and~Date~Functions+Timer~to~Start~Every~Day~or~M-F~at~a~Specific~Hour.txt