Discussion:
Time function
(too old to reply)
a***@nowhere.you.know
2012-08-12 20:41:21 UTC
Permalink
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
2012-08-12 21:35:28 UTC
Permalink
***@nowhere.you.know wrote:
| 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?

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
Harald Peters
2014-04-22 22:24:29 UTC
Permalink
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
Post by Steve Fabian
| I'm wanting to do a btm which doesn't execute a command until a given
| reached. Do any other approaches occur?
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.
--
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
Stan Brown
2012-08-13 01:13:50 UTC
Permalink
Post by a***@nowhere.you.know
I'm wanting to do a btm which doesn't execute a command until a given time.
any other approaches occur?
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
2012-08-13 07:44:50 UTC
Permalink
Post by a***@nowhere.you.know
I'm wanting to do a btm which doesn't execute a command until a given time.
any other approaches occur?
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
2012-08-13 11:47:53 UTC
Permalink
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
Loading...