[Question] Time Clock

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Ranguna173
Posts: 104
Joined: 28 Jul 2011 17:32

[Question] Time Clock

#1 Post by Ranguna173 » 02 Nov 2011 16:00

I've been using this code for "waiting" time:

Code: Select all

ping localhost -n [seconds here] >tmp


But now I have to write something that will pause for 18000 seconds..
I can't use the previews code because pinging my computer for 18000 seconds would cause my internet connection to, significantly, slow down.

My questions is if there is another way then pinging my computer..
I could ping a website but I just need another way..

Thanks!

!k
Expert
Posts: 378
Joined: 17 Oct 2009 08:30
Location: Russia

Re: [Question] Time Clock

#2 Post by !k » 02 Nov 2011 16:20

My questions is if there is another way then pinging my computer..
A mmm... Another way to wait?
Need to create a 60 minutes delay in my DOS script

alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

Re: [Question] Time Clock

#3 Post by alan_b » 02 Nov 2011 17:48

Are you sure it impacts the Internet ?

I understood that Ping sent a harmless echo request and the Operating system might retry at 1 second intervals,
but it is only a few bytes sent each second, plenty of bandwidth left for downloading and browsing.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: [Question] Time Clock

#4 Post by Ed Dyreen » 02 Nov 2011 18:13

'
No external files needed, trick a jeb :

Code: Select all

@if (@X) == (@Y) @goto :Dummy @end/* Enable Jscript comment, must be first line in batch !

call CScript.EXE //NoLogo //e:JScript "%0"
pause
exit

:: Jscript part begins here
::(
   */
      WSH.Sleep ( 1000 );
   /*
::)

Ranguna173
Posts: 104
Joined: 28 Jul 2011 17:32

Re: [Question] Time Clock

#5 Post by Ranguna173 » 03 Nov 2011 11:16

alan_b wrote:Are you sure it impacts the Internet ?


Positive.
A drop from 20KB/s to .4KB/s...
That sure affects internet..

!k wrote:A mmm... Another way to wait?
Need to create a 60 minutes delay in my DOS script


Thanks for the link found out that the best option for "waiting" is, as Ed Dyreen wrote:


Ed Dyreen wrote:'
No external files needed, trick a jeb :

Code: Select all

@if (@X) == (@Y) @goto :Dummy @end/* Enable Jscript comment, must be first line in batch !

call CScript.EXE //NoLogo //e:JScript "%0"
pause
exit

:: Jscript part begins here
::(
   */
      WSH.Sleep ( 1000 );
   /*
::)


A VBScript.

Thanks!

Post Reply