Task Scheduler Bug ?

Z

Zaidy036

Win 7 Home SP-1

I have set up a task that runs a batch every night at 1:15 AM with
settings:
-Wake computer to run
-If not start try 3 times at 5 minute intervals
-Stop after 12 hours if running

This batch includes a backup command using RoboCopy and the recent upgrade
of iTunes caused the backup to not complete in 12 hours.

At the 12th hour the Task was stopped. History shows this as an "error" and
batch was restarted using the second restart after 5 minutes. This would
have repeated again after 12 hours if I did not manually stop the batch.

I would expect the batch to terminate and NOT restart at the "Stop". I can
eliminate this action by eliminating the 3 retries but then if batch fails
at initial start will not try again.

I do not think the "stop after x hours setting" should be treated as an
error.

Do you agree that this is a bug?r
 
G

Gene E. Bloch

Win 7 Home SP-1

I have set up a task that runs a batch every night at 1:15 AM with
settings:
-Wake computer to run
-If not start try 3 times at 5 minute intervals
-Stop after 12 hours if running

This batch includes a backup command using RoboCopy and the recent upgrade
of iTunes caused the backup to not complete in 12 hours.

At the 12th hour the Task was stopped. History shows this as an "error" and
batch was restarted using the second restart after 5 minutes. This would
have repeated again after 12 hours if I did not manually stop the batch.

I would expect the batch to terminate and NOT restart at the "Stop". I can
eliminate this action by eliminating the 3 retries but then if batch fails
at initial start will not try again.

I do not think the "stop after x hours setting" should be treated as an
error.

Do you agree that this is a bug?r
No.

Change the stop-after to a longer time, or get rid of the restart
option.

"Error" just means that the program returned an unsuccessful completion
code. Given what you describe, the completion *was* unsuccessful, so...
 
Z

Zaidy036

Gene E. Bloch said:
On Wed, 19 Oct 2011 15:42:27 +0000 (UTC), Zaidy036 wrote:


No.

Change the stop-after to a longer time, or get rid of the restart
option.
Next longer is 24 hours....a little excessive
"Error" just means that the program returned an unsuccessful completion
code. Given what you describe, the completion *was* unsuccessful, so...
Batch and RoboCopy were running...completion was only by task time out, NOT
unsuccessful completion.
 
G

Gene E. Bloch

Next longer is 24 hours....a little excessive
And 12 hours is not enough.
Batch and RoboCopy were running...completion was only by task time out, NOT
unsuccessful completion.
I'll try one more time.

If the program is terminated, it reports an unsuccessful completion.

Goodbye.
 
G

Gene E. Bloch

And 12 hours is not enough.
Another thing, which I eventually realized you didn't understand. You
are not restricted to 12 hours and 24 hours. You can highlight the
digits and type in, oh, let's say, 15 hours.
 
Z

Zaidy036

Another thing, which I eventually realized you didn't understand. You
are not restricted to 12 hours and 24 hours. You can highlight the
digits and type in, oh, let's say, 15 hours.
I was traveling and until now could not try your suggestion of entering
my choice of hours. Thank you for that input, I had assumed that since
the values were pre-populated that they were fixed and could not be changed.

My 'bug' thought is because the start and terminate times are NOT
independent of one another UNLESS one does NOT use retries. More logical
would be to have a terminate time in reference to the time that the task
actually starts whether at the original time or on a retry.
 
G

Gene E. Bloch

I was traveling and until now could not try your suggestion of entering
my choice of hours.
That's fine. I actually remember the discussion :)
Thank you for that input, I had assumed that since
the values were pre-populated that they were fixed and could not be changed.
It's not exactly user friendly :)

I don't remember how I learned about that. Maybe I was just feeling
obstreperous and decided to try it...
My 'bug' thought is because the start and terminate times are NOT
independent of one another UNLESS one does NOT use retries. More logical
would be to have a terminate time in reference to the time that the task
actually starts whether at the original time or on a retry.
I would have guessed that the x hours related to the actual start time.
Have you seen that it relates to the scheduled time only?

The condition says "Stop the task if it runs longer than x hours". That
sounds to me like it's measured from the start of the task, not from the
scheduled time.

Otherwise, for instance, a task scheduled to run at 01:00, to start as
soon as possible after that if it's missed, and to run one hour, would
never run at all if I never booted until after 02:00...

Which is not what I think I've experienced (but I haven't watched like a
hawk).
 
Z

Zaidy036

That's fine. I actually remember the discussion :)


It's not exactly user friendly :)

I don't remember how I learned about that. Maybe I was just feeling
obstreperous and decided to try it...


I would have guessed that the x hours related to the actual start time.
Have you seen that it relates to the scheduled time only?

The condition says "Stop the task if it runs longer than x hours". That
sounds to me like it's measured from the start of the task, not from the
scheduled time.

Otherwise, for instance, a task scheduled to run at 01:00, to start as
soon as possible after that if it's missed, and to run one hour, would
never run at all if I never booted until after 02:00...

Which is not what I think I've experienced (but I haven't watched like a
hawk).
I had an unattended overnight batch scheduled for 1:15 AM with 2
restarts at 5 minutes and a 12 hour terminate. The task is set to 'wake
the PC' if needed.

It started as usual on the first attempt and at 1:15 PM it terminated
AND then restarted after a 5 minute wait for the first retry.

I was periodically looking at the log generated by the batch and noticed
it had restarted at 1:20 PM after the initial start at 1:15 AM so I
manually stopped the batch <Ctrl-C>. The Task Scheduler history clearly
showed what had happened.

Not a problem for short termination times but would you like to run for
36 hours and 10 minutes and never actually complete?
 

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