Pegasus
Fri Jul 11 03:28:36 PDT 2008
<createwindow@gmail.com> wrote in message
news:78331fdf-965c-46bb-a5cf-dea2750f4f52@b1g2000hsg.googlegroups.com...
> Dear Pegasus,
>
> I did a test on Vista Business and Server 2008 x64 and sure enough the
> task stopped triggering based on "start every minute" for a "duration
> of 3 minutes". However the Next Run Time is _every_ 'next' minute.
> Just that when the 4th minute, 5th minute etc. comes around 'nothing
> happens' or is logged which is good. But the Next Run Time increments
> to the next minute. I would have thought the "Next Run Time" would be
> next month as I am triggering on 2nd Friday of every month.
>
> My original backup script is still running at 2 mins past the hour -
> sending me emails - every hour totally ignoring the 6 hour limit I
> placed in the duration. Driving me nuts! :-(
>
> So, it could be a 64 bit problem only? I'll need to do some more
> testing. Could be a 6 hour problem?? I'll post results - could take
> awhile....
>
> Btw my original backup check script (because its been running so long)
> is now complaining that its not the correct day for backups! :-) Cute
> 'eh I forgot I wrote that part into the vbs. :-)
>
> The echo stuff is nice and simple - but the 'pause' needs to be hit-
> any-key'd to get the task to exit. Double starting has never been a
> problem as 500 Ms is all the time my script takes to run.
>
> **Stopping the task triggering and running is the only problem.**
>
> This is my test code: Called test.vbs
>
> '---- Start Code ------
>
> Option Explicit
>
> Dim fso, ts, Filename
> Const ForReading = 1, ForWriting = 2, ForAppending = 8
>
> Filename = "c:\util\Tardis.txt"
>
> Set fso = CreateObject("Scripting.FileSystemObject")
> Set ts = fso.OpenTextFile(Filename, ForAppending, True)
> ts.Writeline(Now())
> ts.Close
> Set ts = Nothing
> Set fso = Nothing
>
> '---- End Code ------
>
> As I said it worked in the time scale of minutes (but has a stupid
> "next run time" - should be NEXT MONTH).
>
> So, will it work in the 6 hour timeframe??
>
> Lets see,
>
> Cheers
> CreateWindow
>
>
http://mymessagetaker.com
You appear to miss the purpose of the "Pause" command. It is
there to cause the task not to end by itself. You should therefore
NOT respond to it but just leave it there on the screen. When
expiry time comes along, it is supposed to disappear - it certainly
does on my machines.
I cannot comment on your own task that you claim keeps on
sending you EMails, because I have not seen it. The way to
debug such issues is to start nice and simple - e.g. by using the
batch file I suggested - then build up to the real thing. In other
words, try to walk before you run. If the Task Scheduler ends
the test batch file after the expiry of "duration" but does not end
your own job then you obviously need to examine your own
job in more detail.