Dec 132017
Run programs at certain times, and pauses. For use in Batch files.
File TIME(R).ZIP from The Programmer’s Corner in
Category Batch Files
Run programs at certain times, and pauses. For use in Batch files.
File Name File Size Zip Size Zip Type
TIME(R).COM 19499 12668 deflated
TIME(R).DOC 7752 2812 deflated

Download File TIME(R).ZIP Here

Contents of the TIME(R).DOC file

TIME(R) -- Multi-Purpose Time & Timer Facility

Copyright (c) 1986 by

Ryan Katri M.I.T. Collie (7pm-3pm)
2575 Drake Hill Road (707) 725-9612
Fortuna, CA 95540 300/1200/2400

All rights reserved.

Released for non-commercial, no-profit, private use only. If you
make any money using this product or use it in your business I
expect fair compensation to be mailed to the address above.


TIME(R) is a program that is mainly for use in batch files. It
provides three functions: Pause, Wait Until, and Loop. Using these
three, you can pause your batch file for any number of seconds,
wait to continue execution until a certain time of day, or loop for
a specified number of seconds to see if an operator is standing by
to press a key before continuing.

TIME(R) can drop an errorlevel to your batch file when using the
Loop or Wait Until options. Thus, your batch file can decide what
operation to perform depending on the errorlevel it receives from


I first wrote TIME(R) for myself to solve a couple problems I was

For one, I had a batch file that sent commands to my modem, only it
sent them too fast (the modem couldn't keep up). I use the Pause
option of TIME(R) to pause for 1 second between each command.

The Pause option is also great for your BBS system if it has
external schedules (like Collie). With Collie you can only set a 1
minute schedule minimum. This can pose a problem if your task only
lasts for 20 seconds; when the task is done it will return to
Collie which will notice the schedule is not over with and run your
task again! Use the Pause option along with your task to wait the
remaining seconds until the schedule time is exhausted.


I also use TIME(R) in my Autoexec.Bat file. What happens is,
whenever the computer is reset (for whatever reason), it ends up
running TIME(R) using the Loop option. The Loop waits for 20
seconds for me to press . If I don't, it exits to my batch
file with an errorlevel set. My autoexec file tests for this
errorlevel and then runs Colossus (my BBS) if the was not
hit. In my configuration I have TIME(R) drop with the same
errorlevel whether I press or it times out.

I also use TIME(R) to run my BBS if there was a power outage and
then it comes back on. What happens is this:

1) My autoexec file runs TIME(R) using the Loop option, which
waits for 15 seconds before dropping back into the batch

2) If no key is pressed within the 15 seconds, then TIME(R)
exits with an errorlevel of 10. My autoexec file tests for
this errorlevel and runs the BBS appropriately.

3) If is pressed it will also drop with an errorlevel
of 10, and therefore run the BBS.

4) If is pressed then TIME(R) exits with an errorlevel
of 0 set. My autoexec file only tests for errorlevel 10, so
the BBS will NOT be run, but instead my memory resident
utilities are loaded and I am given Dos control.

There are several advantages to using this simple method; first,
your BBS will always be run when the computer is turned on (such as
when the electricity comes back on) whether you are there or not.

Secondly, if you use several memory-resident utilities like I do
(CED, KBFIX, etc), then all you have to do to run your BBS without
these things is press your reset keys. The memory-resident stuff
will be unloaded since they are probably not compatible with most
bulletin board systems (Collie, Fido, and others). On the other
hand, if you do a reset and DON'T want to run the BBS, just press
and your utilities will be loaded and you'll have Dos.

Finally, it makes it easy for a mere user of your system (wife,
brother, friend) to use your computer without having to know
anything about setting up the BBS. When they are done with what
they are doing they can just press the reset keys (usually CTRL-
ALT-DEL) and your autoexec batch file can take care of everything


The last option of TIME(R) I don't use too often. This is the Wait
Until option. But it can be very useful feature if you have a
program that NEEDS to be run at a certain time. Use Wait Until to
wait until that time (like 11:03, or ANYTIME!) before running your


TIME(R) is invoked by the command

TIMER {options} [time] ...

Three of the options require a time (either in seconds or a time of
day) to be given.

The following options are:

Option Time Abbrev Function
-------------- --------- ------- ------------------------------
CONFIG C Configure TIME(R)
HELP H or ? Help and summary of commands
LOOP Seconds L Loop for specified number of
seconds or until key pressed
PAUSE Seconds P Pause for specified number of
WAIT Time of W Wait Until a certain time to
Day continue.


CONFIG -- The configuration is not necessary, but allows
customization for your specific needs. Most of
the questions are self-explanatory.

HELP -- Gives a quick summary of TIME(R)'s functions.

LOOP -- Sends TIME(R) into a timed loop, which can be
aborted with a keypress. TIME(R) will exit with
an errorlevel set depending on whether it finished
the timed loop or if a or was
pressed (these errorlevels can be set in the

PAUSE -- This is basically the same as LOOP, only it won't
drop with an errorlevel. The pause can be aborted
with a press of any key.

WAIT -- This option will cause LOOP to wait until a certain
time before exiting (probably into your batch
file). This also can be aborted with or
, which will also exit with the errorlevel
set in the configuration.

NOTE: If the time to wait until is something like
9:00, make sure to include a leading zero
before the 9, so it looks like this: 09:00
If this is not done, TIME(R) will abort with
an Invalid Time error.

 December 13, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>