<page xmlns="http://projectmallard.org/1.0/"
      xmlns:its="http://www.w3.org/2005/11/its"
      xmlns:ui="http://projectmallard.org/ui/1.0/"
      type="guide" style="task 2column"
      id="gtg-recurring-task">

  <info>
  <revision pkgversion="0.4.0" date="2020-11-12" status="candidate"/>
  <link type="guide" xref="index#gtg-working-task" group="sixth"/>
  <link type="seealso" xref="gtg-quickadd"/>
  <link type="seealso" xref="gtg-search-syntax"/>
    <credit type="author copyright">
      <name>Drissi Mohieddine</name>
      <email its:translate="no">m.drissi@protonmail.com</email>
      <years>2020</years>
    </credit>
    <credit type="editor copyright">
      <name>Danielle Vansia</name>
      <email its:translate="no">daniellevansia@gmail.com</email>
      <years>2020</years>
    </credit>

    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>

  </info>

  <title>Using Recurring/Repeating Tasks</title>

  <p>Repeating tasks are the tasks that must be done many times, in a fixed period (day, week, month, year). By making a task repeat, the due date will hold the date by which the task must be completed. If a start date is set, the first occurrence of that task will begin from that start date.</p> 

<section id="set-recurring-tasks">
<title>Setting a Task to Repeat</title>

<p>You can set a task to repeat using one of the following methods:</p> 

<list>
  <item><p>The <gui>Quick Add Entry</gui> is the fastest way. Use the keyword <em style="strong">every</em> when creating the task. See the Valid Recurring Terms section below for the valid syntax.</p></item>
  <item><p>From the <gui>Task Editor</gui>, click the circular arrow button to open the Recurring Task menu.</p></item>
<item><p>From the <gui>Task Browser</gui>, right-click a task. Select <em style="strong">Set Recurring</em> to open the Recurring Task context menu.</p></item>
</list>

<note stlye="tip"><p>In the <gui>Task Editor</gui>, the circular arrow button is displayed as light blue to notify you when the task is set to recurring. The circular arrow icon is also displayed next to a task in the <gui>Task Browser</gui>.</p></note>
<note stlye="tip"><p>If you set a parent task to repeat, the associated subtasks will also be set to repeat.</p></note>
</section>

<section id="valid-recurring-terms">
<title>Valid Recurring Terms</title>

<p>The valid terms are very similar to the <link xref="gtg-date-parsing">Keyword Parsing Syntax</link> for start and due dates with the exception of a few keywords.</p>
<table rules="rows" frame="top bottom" ui:expanded="true">
<title>Recurring Term Syntax</title>
  <thead>
    <tr>
      <td><p><em style="strong">Syntax</em></p></td>
      <td><p><em style="strong">Example</em></p></td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><p><code>yyyy-mm-dd</code> or <code>yyyy/mm/dd</code></p></td>
      <td><p>2020-04-01 or 2020/04/01. This will repeat every year on 04/01.</p></td>
    </tr>
<tr>
      <td><p><code>yyyymmdd</code></p></td>
      <td><p>20200401 This will repeat every year on 04/01.</p></td>
    </tr>
<tr>
      <td><p><code>mmdd</code></p></td>
      <td><p>0401 (with the year being assumed as the current one). This will repeat every year on 04/01.</p></td>
    </tr>
<tr>
          <td><p><code>day</code></p></td>
          <td><p>With this syntax, the task repeats daily.</p></td>
        </tr>
<tr>
        <td><p><code>other-day</code></p></td>
        <td><p>With this syntax, the task repeats every other day.</p></td>
        </tr>
<tr>
        <td><p><code>week</code></p></td>
        <td><p>Will repeat every week on the same day that the task was set.</p></td>
                </tr>
<tr>
        <td><p><code>month</code></p></td>
        <td><p>Will repeat monthly.</p></td>
        </tr>
<tr>
        <td><p><code>year</code></p></td>
        <td><p>Will repeat yearly.</p></td>
        </tr>
<tr>
        <td><p><code>Monday</code> (or any day of the week)</p></td>
        <td><p>Will repeat on that day of the week</p></td>
        </tr>
<tr>
      <td><p><code>27</code> (or any day's number)</p></td>
      <td><p>In this example, the task will recur on every 27 of the month.</p></td>
    </tr>
</tbody>
</table>

</section>
 <section id="recurring-examples">
<title>Recurring Examples</title>
<p>Below are some examples of how recurring terms work. These examples are made using the <gui>Quick Add Entry</gui> but do not differ in result from the <gui>Task Editor</gui>.</p>

<terms>
  <item>
     <title><em style="strong"><code>pay my taxes every:year</code></em></title>
        <p>This task will repeat every year on the date that the task was created.</p></item>
  <item>
     <title><em style="strong"><code>Go out with my dog every:day start:tomorrow</code></em></title>
        <p>By setting a start date, this task will not recur every date from today's date but from the start date.</p></item>
</terms>
</section>
</page>
