3

I'm trying to understand why the NotifyComplete() method gets called even after the 25 second limit for a periodic task execution.

I understand that if notifyComplete() is not called befere 25 seconds, the task is killed, but this is not what is happening. NotifyComplete() is still get called after 60 seconds.

protected override void OnInvoke(ScheduledTask task)
{ 
    Thread.Sleep(60000); // 60 Seconds
    NotifyComplete();
}

Any Ideas?, I'm missunderstanding in some way the way the background agents work? Thanks!

raven
  • 18,004
  • 16
  • 81
  • 112
blackjid
  • 1,571
  • 16
  • 23

1 Answers1

7

If it happens while debugging.

When running under the debugger, the memory and run-time constraints are ignored by the Windows Phone operating system.

Derek Beattie
  • 9,429
  • 4
  • 30
  • 44
  • Hey thanks!; I actually thought about that but I didn't find it anywhere, I don't know why I did't actual try it in a release build.. – blackjid Dec 11 '11 at 16:21