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 - How to schedule a VBScript to run every five minutes

Reply
 
Old 10-07-2008   #1 (permalink)
gimme_this_gimme_that


 
 

How to schedule a VBScript to run every five minutes

I'm using XP SP2.

I tried setting up a task using Task Scheduler to run:

Every 5 minutes from 6:26 PM for 1 hours(s) every day, starting
10/6/2008 and ending 9/7/2009.

But this ran once and that was it.

Any ideas?

My System SpecsSystem Spec
Old 10-07-2008   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: How to schedule a VBScript to run every five minutes


<gimme_this_gimme_that@xxxxxx> wrote in message
news:22a9f77a-7be2-4674-9bc6-521f34947e4d@xxxxxx
Quote:

> I'm using XP SP2.
>
> I tried setting up a task using Task Scheduler to run:
>
> Every 5 minutes from 6:26 PM for 1 hours(s) every day, starting
> 10/6/2008 and ending 9/7/2009.
>
> But this ran once and that was it.
>
> Any ideas?
What duration did you set?


My System SpecsSystem Spec
Old 10-07-2008   #3 (permalink)
James Whitlow


 
 

Re: How to schedule a VBScript to run every five minutes

<gimme_this_gimme_that@xxxxxx> wrote in message
news:22a9f77a-7be2-4674-9bc6-521f34947e4d@xxxxxx
Quote:

> I'm using XP SP2.
>
> I tried setting up a task using Task Scheduler to run:
>
> Every 5 minutes from 6:26 PM for 1 hours(s) every day, starting
> 10/6/2008 and ending 9/7/2009.
>
> But this ran once and that was it.
>
> Any ideas?
You can use the command line task scheduler (watch for wrapping):

schtasks.exe /Create /TN "My Task" /TR "C:\Test.vbs" /RU System /SC Minute
/MO 5



My System SpecsSystem Spec
Old 10-07-2008   #4 (permalink)
gimme_this_gimme_that


 
 

Re: How to schedule a VBScript to run every five minutes

Wow James.

Quite a solution.

I need to run it on three tasks:

For task one:

0,5,10,15,20,25,30,35,40,45,50,55

For task two:

1,6,11,16,21,26,31,36,41,46,51,56

And task three:

2,8,12,17,22,27,32,37,42,47,52,57

So how do I set up the start time to get this to happen?

Thanks!
Quote:

> schtasks.exe /Create /TN "My Task" /TR "C:\Test.vbs" /RU System /SC Minute
> /MO 5
My System SpecsSystem Spec
Old 10-07-2008   #5 (permalink)
gimme_this_gimme_that


 
 

Re: How to schedule a VBScript to run every five minutes

On Oct 7, 3:01*pm, "Pegasus \(MVP\)" <I....@xxxxxx> wrote:
Quote:

> <gimme_this_gimme_t...@xxxxxx> wrote in message
>
> news:22a9f77a-7be2-4674-9bc6-521f34947e4d@xxxxxx
>
Quote:

> > I'm using XP SP2.
>
Quote:

> > I tried setting up a task using Task Scheduler to run:
>
Quote:

> > Every 5 minutes from 6:26 PM for 1 hours(s) every day, starting
> > 10/6/2008 and ending 9/7/2009.
>
Quote:

> > But this ran once and that was it.
>
Quote:

> > Any ideas?
>
> What duration did you set?
My System SpecsSystem Spec
Old 10-07-2008   #6 (permalink)
gimme_this_gimme_that


 
 

Re: How to schedule a VBScript to run every five minutes

Quote:

> What duration did you set?
One hour.

What does duration refer to? What should it be?

Thanks.
My System SpecsSystem Spec
Old 10-07-2008   #7 (permalink)
Al Dunbar


 
 

Re: How to schedule a VBScript to run every five minutes


<gimme_this_gimme_that@xxxxxx> wrote in message
news:22a9f77a-7be2-4674-9bc6-521f34947e4d@xxxxxx
Quote:

> I'm using XP SP2.
>
> I tried setting up a task using Task Scheduler to run:
>
> Every 5 minutes from 6:26 PM for 1 hours(s) every day, starting
> 10/6/2008 and ending 9/7/2009.
>
> But this ran once and that was it.
If it starts on october 6th it is already finished, as september 7th is long
past.

/Al


My System SpecsSystem Spec
Old 10-07-2008   #8 (permalink)
Al Dunbar


 
 

Re: How to schedule a VBScript to run every five minutes

I'm confused as to what you want to do, here...

<gimme_this_gimme_that@xxxxxx> wrote in message
news:f733cf48-1519-45e4-8b86-bd3e1fca19c2@xxxxxx
Quote:

> Wow James.
>
> Quite a solution.
>
> I need to run it on three tasks:
>
> For task one:
>
> 0,5,10,15,20,25,30,35,40,45,50,55
what are these numbers? offsets in minutes from 6:26? Is this task supposed
to start at 6:26, 6:31, 6:36, and etc? how long will each instance run
before it stops running? If more than 5 minutes, each of those will need to
be scheduled separately.

/Al

Quote:

> For task two:
>
> 1,6,11,16,21,26,31,36,41,46,51,56
>
> And task three:
>
> 2,8,12,17,22,27,32,37,42,47,52,57
>
> So how do I set up the start time to get this to happen?
>
> Thanks!
>
Quote:

>> schtasks.exe /Create /TN "My Task" /TR "C:\Test.vbs" /RU System /SC
>> Minute
>> /MO 5
>

My System SpecsSystem Spec
Old 10-07-2008   #9 (permalink)
James Whitlow


 
 

Re: How to schedule a VBScript to run every five minutes

<gimme_this_gimme_that@xxxxxx> wrote in message
news:f733cf48-1519-45e4-8b86-bd3e1fca19c2@xxxxxx
Quote:

> Wow James.
>
> Quite a solution.
>
> I need to run it on three tasks:
>
> For task one:
>
> 0,5,10,15,20,25,30,35,40,45,50,55
>
> For task two:
>
> 1,6,11,16,21,26,31,36,41,46,51,56
>
> And task three:
>
> 2,8,12,17,22,27,32,37,42,47,52,57
>
> So how do I set up the start time to get this to happen?
You can use the '/ST' switch to specify a start time. Modifying the
original example to have it start at 4 PM:

schtasks.exe /Create /TN "My Task" /TR "C:\Test.vbs" /RU System /SC Minute
/MO 5 /ST 16:00:00

You can type 'schtasks.exe /Create /?' at the command prompt to get the
syntax and a listing of the switches.

For your examples above, just start task one at the beginning of the
hour (/ST 16:00:00), task two at one minute past (/ST 16:01:00) & task three
for two minutes after (/ST 16:02:00). Modify for your preferred starting
hour...


My System SpecsSystem Spec
Old 10-07-2008   #10 (permalink)
Dave Patrick


 
 

Re: How to schedule a VBScript to run every five minutes

Set it to 24 hours if you want it to run continuously. If you set it for
every five minutes for 12 hours beginning at 1:00 AM then it would run every
five minutes from 1:00 AM to 1:00 PM

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


<gimme_this_gimme_that@xxxxxx> wrote:
Quote:

>
Quote:

>> What duration did you set?
>
> One hour.
>
> What does duration refer to? What should it be?
>
> Thanks.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Re: How to schedule a vbscript as a Scheduled Task in Server 2003 VB Script
How to do No hang up VBScript (nohup for VBScript) VB Script
Vista Offline Files Consuming 100% CPU for 2 minutes every few minutes Vista General
Schedule backups Vista account administration
Still on schedule. Vista General


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