Symbian3/SDK/Source/GUID-3CDCE4E0-E29D-5782-8053-B386A9E34BCC.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-3CDCE4E0-E29D-5782-8053-B386A9E34BCC" xml:lang="en"><title>Task
       
    13 Scheduler Overview</title><abstract><p>The Task Scheduler enables clients to schedule tasks for time-based
       
    14 and condition-based execution. The Task Scheduler is a <xref href="GUID-A3449F37-89BB-5208-8FD5-F4DF73F7E71A.dita">Startup
       
    15 State Aware </xref> component. This ensures no task is initiated
       
    16 before all system-level services are up and running. </p><p>The time or condition
       
    17 for task execution is defined in a schedule. Schedules and tasks can be persistent
       
    18 or transient. Schedules can be created, edited and deleted. </p><p> The Task
       
    19 Scheduler participates in a system-wide backup or restore operation initiated
       
    20 by the <xref href="GUID-EB624E33-0FB1-33BB-A423-0CB3C0A71548.dita"><apiname>Secure Backup Engine</apiname></xref> as a passive backup client.
       
    21 This ensures the persistent schedules are backed up and restored.</p></abstract><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    22 <section><title>Required background</title> <p>In a condition-based schedule,
       
    23 a condition can be user-defined or system condition. User defined conditions
       
    24 are published using Publish and Subscribe keys. For more information about
       
    25 Publish and Subscribe concept refer <xref href="GUID-A81C65CF-CF4E-571C-8080-9D387F46AAD6.dita"> Publish
       
    26 and Subscribe.</xref>  </p> </section>
       
    27 <section><title>Key concepts and terms</title> <dl>
       
    28 <dlentry>
       
    29 <dt>Task</dt>
       
    30 <dd><p>The execution of an application or program. </p> </dd>
       
    31 </dlentry>
       
    32 <dlentry>
       
    33 <dt> Schedule</dt>
       
    34 <dd><p>A plan for performing a task. </p> </dd>
       
    35 </dlentry>
       
    36 <dlentry>
       
    37 <dt>Persistent Schedule</dt>
       
    38 <dd><p>The lifetime of a persistent schedule is not limited to the lifetime
       
    39 of the tasks associated with it. </p> </dd>
       
    40 </dlentry>
       
    41 <dlentry>
       
    42 <dt>Transient Schedule</dt>
       
    43 <dd><p>A Transient schedule is created with a new scheduled task and is destroyed
       
    44 on task destruction. Transient schedules and tasks are not persisted on disk-based
       
    45 storage. </p> </dd>
       
    46 </dlentry>
       
    47 <dlentry>
       
    48 <dt>Time-based Schedule</dt>
       
    49 <dd><p>A Time-based schedule contains one or more tasks that are due for execution
       
    50 at a specified time. </p> </dd>
       
    51 </dlentry>
       
    52 <dlentry>
       
    53 <dt>Condition-based Schedule</dt>
       
    54 <dd><p>A condition-based schedule contains one or more tasks which are executed
       
    55 when either a set of certin Publish and Subscribe conditions are met or a
       
    56 default time-out is reached. </p> </dd>
       
    57 </dlentry>
       
    58 <dlentry>
       
    59 <dt> Home-Time based Schedule</dt>
       
    60 <dd><p>A home-time based schedule occur at a given local time. Local time
       
    61 typically includes changes for time zone and DST. These schedules are referred
       
    62 to as ‘floating’ schedules. </p> </dd>
       
    63 </dlentry>
       
    64 <dlentry>
       
    65 <dt>Daylight Saving Time (DST)</dt>
       
    66 <dd><p>Daylight Saving Time (or summertime as it is called in many countries)
       
    67 is a way of utilizing more daylight by advancing the local time by one hour
       
    68 during the summer. </p> </dd>
       
    69 </dlentry>
       
    70 <dlentry>
       
    71 <dt> Coordinated Universal Time (UTC) </dt>
       
    72 <dd><p>UTC is independent of location. UTC-based schedules occur at a given
       
    73 UTC time regardless of the local time. </p> </dd>
       
    74 </dlentry>
       
    75 </dl> </section>
       
    76 <section><title>Architecture</title> <p>The task scheduler is a permanent
       
    77 server. It is automatically started when the phone boots or reboots and does
       
    78 not shutdown while the phone is running. If the server fails, and cannot be
       
    79 automatically restarted, the phone restarts automatically. Persistent schedules
       
    80 are stored the permanent file store. Transient schedules are lost if the server
       
    81 fails. </p> <p>A client must register with the task scheduler before it can
       
    82 schedule a task. </p> </section>
       
    83 <section><title>APIs</title> <p>The main APIs of the task scheduler are: </p> <table id="GUID-827B6362-E8E1-5EA3-937F-E655CCEB97D2">
       
    84 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
    85 <thead>
       
    86 <row>
       
    87 <entry>API</entry>
       
    88 <entry>Description</entry>
       
    89 </row>
       
    90 </thead>
       
    91 <tbody>
       
    92 <row>
       
    93 <entry><p> <xref href="GUID-049FF2D7-8444-3E87-BF2F-DD0EA9B10ED0.dita"><apiname>CScheduledTask</apiname></xref>  </p> </entry>
       
    94 <entry><p>A scheduled task </p> </entry>
       
    95 </row>
       
    96 <row>
       
    97 <entry><p> <xref href="GUID-6E138B87-ED51-3C72-9075-8D7F887FA7B1.dita"><apiname>RScheduler</apiname></xref>  </p> </entry>
       
    98 <entry><p>The client side interface to the Task Scheduler. </p> </entry>
       
    99 </row>
       
   100 </tbody>
       
   101 </tgroup>
       
   102 </table> </section>
       
   103 <section><title>Typical uses</title> <p>The main uses of the task scheduler
       
   104 are: </p> <ul>
       
   105 <li id="GUID-5A6433D7-73AC-5FCA-AF14-60DFFBA69545"><p>Schedule a sequence
       
   106 of tasks to be executed based on time. </p> </li>
       
   107 <li id="GUID-F8F7BF9A-A42F-5C1F-A6E3-4DEA2202B4FE"><p>Schedule a sequence
       
   108 of tasks to be executed based on conditions. </p> </li>
       
   109 </ul> <p>For more information about using the task scheduler APIs, see the <xref href="GUID-74C1C345-823C-5CD5-8FC5-214A55734E94.dita">Developing Programs with
       
   110 Task Scheduling Capabilities</xref> section. </p> </section>
       
   111 <section><title>See also</title> <p><xref href="GUID-00363030-AAE2-5231-8407-AC609DA0F496.dita">Backup
       
   112 and Restore on Scheduled Tasks in Persistent Schedules</xref>  </p> </section>
       
   113 </conbody></concept>