Windows 7 Forums


Reply
Thread Tools

Task Scheduler Bug ?

 
 
Zaidy036
Guest
Posts: n/a
Thanked:
 
      10-19-2011
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
 
Reply With Quote
 
 
 
 
Gene E. Bloch
Guest
Posts: n/a
Thanked:
 
      10-19-2011
On Wed, 19 Oct 2011 15:42:27 +0000 (UTC), Zaidy036 wrote:

> 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...

--
Gene E. Bloch (Stumbling Bloch)
 
Reply With Quote
 
Zaidy036
Guest
Posts: n/a
Thanked:
 
      10-19-2011
"Gene E. Bloch" <not-> wrote:
> On Wed, 19 Oct 2011 15:42:27 +0000 (UTC), Zaidy036 wrote:
>

<snip>

>> 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.


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.
 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a
Thanked:
 
      10-19-2011
On Wed, 19 Oct 2011 19:54:06 +0000 (UTC), Zaidy036 wrote:

> "Gene E. Bloch" <not-> wrote:
>> On Wed, 19 Oct 2011 15:42:27 +0000 (UTC), Zaidy036 wrote:
>>

> <snip>
>
>>> 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.

>
> Next longer is 24 hours....a little excessive


And 12 hours is not enough.

>> "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.


I'll try one more time.

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

Goodbye.

--
Gene E. Bloch (Stumbling Bloch)
 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a
Thanked:
 
      10-20-2011
On Wed, 19 Oct 2011 13:59:11 -0700, Gene E. Bloch wrote:

> On Wed, 19 Oct 2011 19:54:06 +0000 (UTC), Zaidy036 wrote:
>
>> "Gene E. Bloch" <not-> wrote:
>>> On Wed, 19 Oct 2011 15:42:27 +0000 (UTC), Zaidy036 wrote:
>>>

>> <snip>
>>
>>>> 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.

>>
>> Next longer is 24 hours....a little excessive

>
> 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.

>>> "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.

>
> I'll try one more time.
>
> If the program is terminated, it reports an unsuccessful completion.
>
> Goodbye.



--
Gene E. Bloch (Stumbling Bloch)
 
Reply With Quote
 
Zaidy036
Guest
Posts: n/a
Thanked:
 
      10-28-2011
On 10/19/2011 7:53 PM, Gene E. Bloch wrote:
> On Wed, 19 Oct 2011 13:59:11 -0700, Gene E. Bloch wrote:
>
>> On Wed, 19 Oct 2011 19:54:06 +0000 (UTC), Zaidy036 wrote:
>>
>>> "Gene E. Bloch"<not-> wrote:
>>>> On Wed, 19 Oct 2011 15:42:27 +0000 (UTC), Zaidy036 wrote:
>>>>
>>> <snip>
>>>
>>>>> 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.
>>>
>>> Next longer is 24 hours....a little excessive

>>
>> 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.
>
>>>> "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.

>>
>> I'll try one more time.
>>
>> If the program is terminated, it reports an unsuccessful completion.
>>
>> Goodbye.

>
>

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.
--
Zaidy036
 
Reply With Quote
 
Gene E. Bloch
Guest
Posts: n/a
Thanked:
 
      10-28-2011
On Thu, 27 Oct 2011 21:33:44 -0400, Zaidy036 wrote:

> 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).

--
Gene E. Bloch (Stumbling Bloch)
 
Reply With Quote
 
Zaidy036
Guest
Posts: n/a
Thanked:
 
      10-28-2011
On 10/27/2011 10:17 PM, Gene E. Bloch wrote:
> On Thu, 27 Oct 2011 21:33:44 -0400, Zaidy036 wrote:
>
>> 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).
>

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?

--
Zaidy036
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Experience Index Tool - WinSAT.exe Kougar Windows 7 Support 7 10-30-2010 10:34 AM
Task scheduler conditions -Sandro- Windows 7 Support 6 01-25-2010 10:42 AM
Task Scheduler unable to create file CRGibson Windows 7 Support 1 01-24-2010 03:07 AM
Disappearing Web Video Task Bars. raffles General Discussion 0 01-09-2010 07:47 PM
Task Scheduler doesnt work? sombster Windows 7 Support 0 05-05-2009 09:49 PM


All times are GMT +1. The time now is 06:36 AM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.

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