Help

J

James

Does anyone know how to delay a batch file from running.
I have researched this on he web & found the following;

sleep 6000
sleep 6000;
sleep (6000);

None of these pause my batch file for 60secs as it should.

I know about the pause command, unfortunately I need this
to run automatically at a certain time.

Regards

James

Ps I know this not a dos newsgroup but I thought that one
of you guru's would know
 
M

Martin

James said:
Does anyone know how to delay a batch file from running.
I have researched this on he web & found the following;

sleep 6000
sleep 6000;
sleep (6000);

None of these pause my batch file for 60secs as it should.

I know about the pause command, unfortunately I need this
to run automatically at a certain time.

Regards

James

Ps I know this not a dos newsgroup but I thought that one
of you guru's would know

Sleep() is not a standard DOS utility, so your PC will only have it if
someone put it there.
Try searching one of the ShareWare libraries (like TwoCows.com, or
DownLoad.com).
 
D

David

James

In Windows 2000 (and maybe later versions) open up Control Panel, and click
on Scheduled Tasks.

This scheduler allows you to set a time to run a program (and repeatedly
should you so wish) and can be used to start a batch file at any time you
like.

Or did you mean that once your batch file has started running you wanted it
to pause for a given number of seconds at some point? It is a simple matter
to write a program to do this - I have written my own sleep.exe (in C) for
exactly this purpose. You can have a copy if you like - but would you trust
an exe file from a stranger?

David
 
B

Bob I

A convenient substitute is

PING -n 61 127.0.0.1

the number after the -n equals the seconds desired plus 1
 
B

Bastet

James said:
Does anyone know how to delay a batch file from running.
I have researched this on he web & found the following;

sleep 6000
sleep 6000;
sleep (6000);

None of these pause my batch file for 60secs as it should.

I know about the pause command, unfortunately I need this
to run automatically at a certain time.

Regards

James

Ps I know this not a dos newsgroup but I thought that one
of you guru's would know

No, you're right, this is not a DOS newsgroup - it is a group for the MS
Office - please go and find a more suitable place to post...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top