Dec 112017
Utility for use in batch files that alerts you if your system clock has stopped running. It will set a errorlevel greater then 0. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
CHKCLOCK.COM | 5472 | 3389 | deflated |
CHKCLOCK.DOC | 1437 | 715 | deflated |
Download File CHKCLO.ZIP Here
Contents of the CHKCLOCK.DOC file
CHKCLOCK.COM
This is a non-resident program run from AUTOEXEC.BAT to check that
clock is still working. CHKCLOCK reads the DOS system time and date.
If hour is zero (midnight) or year is earlier than 1989, program
sounds a brief alarm, shows error message, and exits with errorlevel
of 1. With most computers, if clock battery fails, DOS defaults to
midnight, 1/1/80, every time it is booted.
The current year may specifically be added as a command line
argument. When that option is used, if the DOS date is any year other
than the current year, the alarm will sound (although if you specify
a current year earlier than 1989 the alarm will still sound).
When no error is detected in hour/year, the program exits with an
errorlevel of zero.
The 2 possible formats in AUTOEXEC.BAT, to cause automatic prompting
for a new date and time when there is an error, would be as follows.
1) Checks for hour greater than zero and year greater than 1988:
CHKCLOCK
if not errorlevel 1 goto NEXT
date
time
:NEXT
2) Checks for hour greater than zero and year equal to argument,
where argument is current year and is greater than 1988:
CHKCLOCK 1989
if not errorlevel 1 goto NEXT
date
time
:NEXT
This is public domain software and may be distributed freely without
cost. There are no guarantees or any kind.
-- Jim Wygant, 1130 SW Morrison, #220, Portland, OR 97205
9/15/89
This is a non-resident program run from AUTOEXEC.BAT to check that
clock is still working. CHKCLOCK reads the DOS system time and date.
If hour is zero (midnight) or year is earlier than 1989, program
sounds a brief alarm, shows error message, and exits with errorlevel
of 1. With most computers, if clock battery fails, DOS defaults to
midnight, 1/1/80, every time it is booted.
The current year may specifically be added as a command line
argument. When that option is used, if the DOS date is any year other
than the current year, the alarm will sound (although if you specify
a current year earlier than 1989 the alarm will still sound).
When no error is detected in hour/year, the program exits with an
errorlevel of zero.
The 2 possible formats in AUTOEXEC.BAT, to cause automatic prompting
for a new date and time when there is an error, would be as follows.
1) Checks for hour greater than zero and year greater than 1988:
CHKCLOCK
if not errorlevel 1 goto NEXT
date
time
:NEXT
2) Checks for hour greater than zero and year equal to argument,
where argument is current year and is greater than 1988:
CHKCLOCK 1989
if not errorlevel 1 goto NEXT
date
time
:NEXT
This is public domain software and may be distributed freely without
cost. There are no guarantees or any kind.
-- Jim Wygant, 1130 SW Morrison, #220, Portland, OR 97205
9/15/89
December 11, 2017
Add comments