So my teacher gave us this problem: create a batch program that will warn me when the school hour is ending, so I have some time to save all my work. Now, my question is, how can i make a program thet waits till a certain time to do something (in this case printing a bell character)?
Thanks in advance!
[HELP]Alarm in batch program
Moderator: DosItHelp
Re: [HELP]Alarm in batch program
You can parse the output of the %time% variable and loop until it is the time you need.
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: [HELP]Alarm in batch program
foxidrive wrote:You can parse the output of the %time% variable and loop until it is the time you need.
Expanding on that, I've found that it's best to wait two seconds between loop iterations, otherwise your CPU utilization skyrockets.
That said, I think this problem would be best suited to be solved simply by using the Task Manager and scheduling it to run at the end of the school day.