Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - After script is complete, wait 15 minutes, then run again

Reply
 
Old 07-22-2009   #1 (permalink)
Robert Jacobs


 
 

After script is complete, wait 15 minutes, then run again

Thanks in advance, experts.

I have a script that I would like to, whent he script has finished, it
waits for 5 or 10 or 15 minutes, then runs it again, without setting
up a scheduled task or processes - just built into the script
somehow. Is that possible?

Also, in a separate post I asked this question, but I'll add it here
just in case. Is there a way to attempt moving a file, if there is an
error it logs the error in a text file (already setup), but only
attempts moving the file, or only logs the error a certain number of
times, as to not fill the log with the same error multiple times?

My System SpecsSystem Spec
Old 07-22-2009   #2 (permalink)
Pegasus [MVP]


 
 

Re: After script is complete, wait 15 minutes, then run again


"Robert Jacobs" <robertjacobsit@xxxxxx> wrote in message
news:e1032554-0282-4a05-bd75-415c7048190b@xxxxxx
Quote:

> Thanks in advance, experts.
>
> I have a script that I would like to, whent he script has finished, it
> waits for 5 or 10 or 15 minutes, then runs it again, without setting
> up a scheduled task or processes - just built into the script
> somehow. Is that possible?
>
> Also, in a separate post I asked this question, but I'll add it here
> just in case. Is there a way to attempt moving a file, if there is an
> error it logs the error in a text file (already setup), but only
> attempts moving the file, or only logs the error a certain number of
> times, as to not fill the log with the same error multiple times?
Here is the generic answer:

Do
MyScript
wscript.sleep 5 * 60 * 1000
Loop

sub MyScript
{Your code goes here}
end sub

Your script will obviously run forever or until you break out of it.


My System SpecsSystem Spec
Old 07-22-2009   #3 (permalink)
Robert Jacobs


 
 

Re: After script is complete, wait 15 minutes, then run again

On Jul 22, 11:13*am, "Pegasus [MVP]" <n...@xxxxxx> wrote:
Quote:

> "Robert Jacobs" <robertjacob...@xxxxxx> wrote in message
>
> news:e1032554-0282-4a05-bd75-415c7048190b@xxxxxx
>
Quote:

> > Thanks in advance, experts.
>
Quote:

> > I have a script that I would like to, whent he script has finished, it
> > waits for 5 or 10 or 15 minutes, then runs it again, without setting
> > up a scheduled task or processes - just built into the script
> > somehow. *Is that possible?
>
Quote:

> > Also, in a separate post I asked this question, but I'll add it here
> > just in case. *Is there a way to attempt moving a file, if there is an
> > error it logs the error in a text file (already setup), but only
> > attempts moving the file, or only logs the error a certain number of
> > times, as to not fill the log with the same error multiple times?
>
> Here is the generic answer:
>
> Do
> * * MyScript
> * * wscript.sleep 5 * 60 * 1000
> Loop
>
> sub MyScript
> * * {Your code goes here}
> end sub
>
> Your script will obviously run forever or until you break out of it.
Thank you very much for your reply. I appreciate it.
My System SpecsSystem Spec
Old 07-22-2009   #4 (permalink)
Pegasus [MVP]


 
 

Re: After script is complete, wait 15 minutes, then run again


"Robert Jacobs" <robertjacobsit@xxxxxx> wrote in message
news:f81615ca-5278-4649-92c4-85430337a88f@xxxxxx

Thank you very much for your reply. I appreciate it.

=========

Thanks for the feedback.


My System SpecsSystem Spec
Old 07-23-2009   #5 (permalink)
Auric__


 
 

Re: After script is complete, wait 15 minutes, then run again

On Wed, 22 Jul 2009 19:27:10 GMT, Robert Jacobs wrote:
Quote:

> I mentioned that I didn't want to use a scheduled task, but thanks for
> your reply. Pegasus' version worked just fine.
Sorry. Guess I wasn't paying attention yesterday.

--
I seem to have obtained a second shadow.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Script not waiting for previous command to complete PowerShell
Script producing ""Not enough storage is available to complete..." VB Script
Vista Offline Files Consuming 100% CPU for 2 minutes every few minutes Vista General
Vista -- Completed print jobs wait in queue 2 minutes before clear Vista print fax & scan
A click takes minutes to operate clicks too close cause long wait Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46