Symbian3/SDK/Source/GUID-3CDCE4E0-E29D-5782-8053-B386A9E34BCC.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-3CDCE4E0-E29D-5782-8053-B386A9E34BCC" xml:lang="en"><title>Task
Scheduler Overview</title><abstract><p>The Task Scheduler enables clients to schedule tasks for time-based
and condition-based execution. The Task Scheduler is a <xref href="GUID-A3449F37-89BB-5208-8FD5-F4DF73F7E71A.dita">Startup
State Aware </xref> component. This ensures no task is initiated
before all system-level services are up and running. </p><p>The time or condition
for task execution is defined in a schedule. Schedules and tasks can be persistent
or transient. Schedules can be created, edited and deleted. </p><p> The Task
Scheduler participates in a system-wide backup or restore operation initiated
by the <xref href="GUID-EB624E33-0FB1-33BB-A423-0CB3C0A71548.dita"><apiname>Secure Backup Engine</apiname></xref> as a passive backup client.
This ensures the persistent schedules are backed up and restored.</p></abstract><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Required background</title> <p>In a condition-based schedule,
a condition can be user-defined or system condition. User defined conditions
are published using Publish and Subscribe keys. For more information about
Publish and Subscribe concept refer <xref href="GUID-A81C65CF-CF4E-571C-8080-9D387F46AAD6.dita"> Publish
and Subscribe.</xref>  </p> </section>
<section><title>Key concepts and terms</title> <dl>
<dlentry>
<dt>Task</dt>
<dd><p>The execution of an application or program. </p> </dd>
</dlentry>
<dlentry>
<dt> Schedule</dt>
<dd><p>A plan for performing a task. </p> </dd>
</dlentry>
<dlentry>
<dt>Persistent Schedule</dt>
<dd><p>The lifetime of a persistent schedule is not limited to the lifetime
of the tasks associated with it. </p> </dd>
</dlentry>
<dlentry>
<dt>Transient Schedule</dt>
<dd><p>A Transient schedule is created with a new scheduled task and is destroyed
on task destruction. Transient schedules and tasks are not persisted on disk-based
storage. </p> </dd>
</dlentry>
<dlentry>
<dt>Time-based Schedule</dt>
<dd><p>A Time-based schedule contains one or more tasks that are due for execution
at a specified time. </p> </dd>
</dlentry>
<dlentry>
<dt>Condition-based Schedule</dt>
<dd><p>A condition-based schedule contains one or more tasks which are executed
when either a set of certin Publish and Subscribe conditions are met or a
default time-out is reached. </p> </dd>
</dlentry>
<dlentry>
<dt> Home-Time based Schedule</dt>
<dd><p>A home-time based schedule occur at a given local time. Local time
typically includes changes for time zone and DST. These schedules are referred
to as ‘floating’ schedules. </p> </dd>
</dlentry>
<dlentry>
<dt>Daylight Saving Time (DST)</dt>
<dd><p>Daylight Saving Time (or summertime as it is called in many countries)
is a way of utilizing more daylight by advancing the local time by one hour
during the summer. </p> </dd>
</dlentry>
<dlentry>
<dt> Coordinated Universal Time (UTC) </dt>
<dd><p>UTC is independent of location. UTC-based schedules occur at a given
UTC time regardless of the local time. </p> </dd>
</dlentry>
</dl> </section>
<section><title>Architecture</title> <p>The task scheduler is a permanent
server. It is automatically started when the phone boots or reboots and does
not shutdown while the phone is running. If the server fails, and cannot be
automatically restarted, the phone restarts automatically. Persistent schedules
are stored the permanent file store. Transient schedules are lost if the server
fails. </p> <p>A client must register with the task scheduler before it can
schedule a task. </p> </section>
<section><title>APIs</title> <p>The main APIs of the task scheduler are: </p> <table id="GUID-827B6362-E8E1-5EA3-937F-E655CCEB97D2">
<tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
<thead>
<row>
<entry>API</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><p> <xref href="GUID-049FF2D7-8444-3E87-BF2F-DD0EA9B10ED0.dita"><apiname>CScheduledTask</apiname></xref>  </p> </entry>
<entry><p>A scheduled task </p> </entry>
</row>
<row>
<entry><p> <xref href="GUID-6E138B87-ED51-3C72-9075-8D7F887FA7B1.dita"><apiname>RScheduler</apiname></xref>  </p> </entry>
<entry><p>The client side interface to the Task Scheduler. </p> </entry>
</row>
</tbody>
</tgroup>
</table> </section>
<section><title>Typical uses</title> <p>The main uses of the task scheduler
are: </p> <ul>
<li id="GUID-5A6433D7-73AC-5FCA-AF14-60DFFBA69545"><p>Schedule a sequence
of tasks to be executed based on time. </p> </li>
<li id="GUID-F8F7BF9A-A42F-5C1F-A6E3-4DEA2202B4FE"><p>Schedule a sequence
of tasks to be executed based on conditions. </p> </li>
</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
Task Scheduling Capabilities</xref> section. </p> </section>
<section><title>See also</title> <p><xref href="GUID-00363030-AAE2-5231-8407-AC609DA0F496.dita">Backup
and Restore on Scheduled Tasks in Persistent Schedules</xref>  </p> </section>
</conbody></concept>