none
Background tasks funny issue

    Question

  • I am trying to understand the logic for last few days. I could not digest the way how my win 10 phone behaves.

    I have 2 tasks, registered from app. and they are scheduled to run on (FreshnessTime )16 and 17 minutes. One task just put current location in app settings and second taks just take that info and put in textfile.  Both codes are taken from samples As I understand Background tasks are limited to 30 seconds of wall-clock usage, and they run between 15 to 30 minutes of time interval. I don't get any error in registration so I assume device is accepting the tasks and capable to run.

    When these tasks are debugged. Both of the tasks finishes their work in less than 10 seconds having cost ins low, while debug. But when App is deployed and log is checked, results are different. Some times only one task runs, and second task starts after may be day. Very rarely tasks finishes their work, most of the time they get closed without log. canclation event also doesn't produce any log

    Posting log for reference. any hint will be appreciated. [] shows duration in millseconds

    In Location3/19/2017 7:16:56 PM 3/19/2017 7:16:56 PM
    Out Location 0 3/19/2017 7:16:57 PM
    In Communication 3/19/2017 8:20:02 PM 3/19/2017 8:20:02 PM
    In Location3/19/2017 8:20:49 PM 3/19/2017 8:20:49 PM
    In Communication 3/19/2017 9:07:48 PM 3/19/2017 9:07:48 PM
    In Location3/19/2017 9:08:49 PM 3/19/2017 9:08:50 PM
    In Location3/19/2017 10:14:04 PM 3/19/2017 10:14:04 PM
    Out Location [0] 3/19/2017 10:14:05 PM
    In Communication 3/19/2017 10:24:37 PM 3/19/2017 10:24:37 PM
    In Location3/19/2017 10:29:04 PM 3/19/2017 10:29:04 PM
    Out Location 0 3/19/2017 10:29:04 PM
    In Main3/19/2017 10:40:00 PM 3/19/2017 10:40:00 PM
    In Location3/19/2017 10:48:23 PM 3/19/2017 10:48:23 PM
    Out Location 0 3/19/2017 10:48:24 PM
    In Communication 3/19/2017 10:50:09 PM 3/19/2017 10:50:10 PM
    In Communication Data written 3/19/2017 11:49:13 PM 3/19/2017 11:49:19 PM
    Out Communication [10] 3/19/2017 11:49:25 PM
    In Location3/19/2017 11:51:33 PM 3/19/2017 11:51:33 PM
    Out Locationx 389 3/19/2017 11:51:34 PM
    In Main3/19/2017 11:52:16 PM 3/19/2017 11:52:16 PM
    In Location3/20/2017 9:19:00 AM 3/20/2017 9:19:00 AM
    In Location3/20/2017 10:01:44 AM 3/20/2017 10:01:44 AM
    In Main3/20/2017 10:03:46 AM 3/20/2017 10:03:46 AM
    In Location3/20/2017 10:06:06 AM 3/20/2017 10:06:06 AM
    Out Locationx [533] 3/20/2017 10:06:07 AM
    In Location3/20/2017 10:25:01 AM 3/20/2017 10:25:01 AM
    In Location3/20/2017 10:54:18 AM 3/20/2017 10:54:18 AM
    Out Locationx [605] 3/20/2017 10:54:19 AM
    In Location3/20/2017 11:09:43 AM 3/20/2017 11:09:43 AM
    Out Locationx [631] 3/20/2017 11:09:43 AM
    In Location3/20/2017 11:28:55 AM 3/20/2017 11:28:55 AM
    In Location3/20/2017 11:46:04 AM 3/20/2017 11:46:04 AM
    In Location3/20/2017 12:01:09 PM 3/20/2017 12:01:09 PM
    Out Locationx [612] 3/20/2017 12:01:10 PM
    In Location3/20/2017 12:29:21 PM 3/20/2017 12:29:21 PM
    In Location3/20/2017 12:46:33 PM 3/20/2017 12:46:33 PM
    In Location3/20/2017 1:19:25 PM 3/20/2017 1:19:25 PM
    In Location3/20/2017 1:40:08 PM 3/20/2017 1:40:08 PM
    In Location3/20/2017 1:55:10 PM 3/20/2017 1:55:10 PM
    In Location3/20/2017 2:10:10 PM 3/20/2017 2:10:10 PM


    Kishor

    Monday, March 20, 2017 8:29 PM