Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Time function

17 views
Skip to first unread message

anon...@nowhere.you.know

unread,
Aug 12, 2012, 4:41:21 PM8/12/12
to

I'm wanting to do a btm which doesn't execute a command until a given time.
I have thought of using @time with a loop until some time is reached. Do
any other approaches occur?

Steve Fabian

unread,
Aug 12, 2012, 5:35:28 PM8/12/12
to
You do not mention which command processor (4DOS, 4NT, TCMD32, 4OS2, TCC)
and which platform is of interest. However, all have the DELAY command
available, so you can calculate the delay necessary from the current
instance to the one when you want the command executed, and issue the DELAY
command with the appropriate delay time. This will use virtually no
resources until it is time for your command to be executed. Beware!
Different command processor versions may have different DELAY limits, e.g.,
for 4DOS 8 the limit is 3,600s (1h). If you need more delay, you may need to
loop on 1-h delay enough times...

Other 4DOS/4NT/TCC commands may also do the job for you.

If your platform in a version of WinNT, you can also schedule a Windows
service to start a new instance of the command processor at the specified
time.
--
HTH, Steve


Stan Brown

unread,
Aug 12, 2012, 9:13:50 PM8/12/12
to
If you're running in any form of Windows, just use Task Scheduler to
queue the batch file for execution at a particular time.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
Shikata ga nai...

Michael Bednarek

unread,
Aug 13, 2012, 3:44:50 AM8/13/12
to
The following statement will delay execution until the date/time provided in
parameters %1/%2 is reached:

DELAY %@Eval[%@Date[%1]*86400+%@Time[%2]-%@Date[%_Date]*86400-%@Time[%_Time]]

--
Michael Bednarek "ONWARD"

E. S. Fabian

unread,
Aug 13, 2012, 7:47:53 AM8/13/12
to
DELAY range at least
4DOS 7.50 (last JPsoft release) 1 hour
4DOS 7.80+ (freeware updates) 39 years
4NT 3.02+ 39 years

Also, if you use TCC or TCC/LE V13 or later, DELAY allows explicit
specification of

DELAY UNTIL date time

--
HTH, Steve


Harald Peters

unread,
Apr 22, 2014, 6:24:29 PM4/22/14
to
i did this with 4dos and novell

indeed i used a looped btm
which compared current time with set time
and executed some kind of alarm
while projecting the time with
BANNER (novell util)

but that was... a very long time ago..


Op Sun, 12 Aug 2012 23:35:28 +0200 schreef Steve Fabian
<ESFa...@zenge.org>:
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
0 new messages