Previous:Inserting deadlines or schedules, Up:Deadlines and Scheduling [Contents][Index]
Some tasks need to be repeated again and again. Org mode helps toorganize such tasks using a so-called repeater in a ‘DEADLINE’,‘SCHEDULED’, or plain timestamps68. In the following example:
** TODO Pay the rent DEADLINE: <2005-10-01 Sat +1m>
the ‘+1m’ is a repeater; the intended interpretation is that the taskhas a deadline on ‘<2005-10-01>’ and repeats itself every (one) monthstarting from that time. You can use yearly, monthly, weekly, dailyand hourly repeat cookies by using the ‘y’, ‘m’, ‘w’, ‘d’ and ‘h’letters. If you need both a repeater and a special warning period ina deadline entry, the repeater should come first and the warningperiod last
DEADLINE: <2005-10-01 Sat +1m -3d>
Deadlines and scheduled items produce entries in the agenda when theyare over-due, so it is important to be able to mark such an entry asdone once you have done so. When you mark a ‘DEADLINE’ or a‘SCHEDULED’ with the TODO keyword ‘DONE’, it no longer producesentries in the agenda. The problem with this is, however, is thatthen also thenext instance of the repeated entry will not beactive. Org mode deals with this in the following way: when you tryto mark such an entry as done, usingC-c C-t, it shifts thebase date of the repeating timestamp by the repeater interval, andimmediately sets the entry state back to TODO69. In the example above, setting thestate to ‘DONE’ would actually switch the date like this:
** TODO Pay the rent DEADLINE: <2005-11-01 Tue +1m>
When task contains multiple timestamps with repeater interval, allthese timestamps are shifted.
To mark a task with a repeater as DONE, useC-- 1 C-c C-t,i.e.,org-todo with a numeric prefix argument of ‘-1’.
A timestamp70 is added under the deadline, to keep a record thatyou actually acted on the previous instance of this deadline.
As a consequence of shifting the base date, this entry is no longervisible in the agenda when checking past dates, but all futureinstances will be visible.
With the ‘+1m’ cookie, the date shift is always exactly one month. Soif you have not paid the rent for three months, marking this entryDONE still keeps it as an overdue deadline. Depending on the task,this may not be the best way to handle it. For example, if you forgotto call your father for 3 weeks, it does not make sense to call him3 times in a single day to make up for it. Finally, there are tasks,like changing batteries, which should always repeat a certain timeafter the last time you did it. For these tasks, Org mode hasspecial repeaters ‘++’ and ‘.+’. For example:
** TODO Call Father DEADLINE: <2008-02-10 Sun ++1w> Marking this DONE shifts the date by at least one week, but also by as many weeks as it takes to get this date into the future. However, it stays on a Sunday, even if you called and marked it done on Saturday.** TODO Empty kitchen trash DEADLINE: <2008-02-08 Fri 20:00 ++1d> Marking this DONE shifts the date by at least one day, and also by as many days as it takes to get the timestamp into the future. Since there is a time in the timestamp, the next deadline in the future will be on today's date if you complete the task before 20:00.** TODO Check the batteries in the smoke detectors DEADLINE: <2005-11-01 Tue .+1m> Marking this DONE shifts the date to one month after today.** TODO Wash my hands DEADLINE: <2019-04-05 08:00 Fri .+1h> Marking this DONE shifts the date to exactly one hour from now.
You may have both scheduling and deadline information for a specifictask. If the repeater is set for the scheduling information only, youprobably want the repeater to be ignored after the deadline. If so,set the variableorg-agenda-skip-scheduled-repeats-after-deadline tot. However, any scheduling information without a repeater is nolonger relevant once the task is done, and thus, removed uponrepeating the task. If you want both scheduling and deadlineinformation to repeat after the same interval, set the same repeaterfor both timestamps.
An alternative to using a repeater is to create a number of copies ofa task subtree, with dates shifted in each copy. The commandC-c C-x c was created for this purpose; it is described inStructure Editing.
Org does not repeat inactive timestamps, however. SeeTimestamps.
In fact, the targetstate is taken from, in this sequence, the ‘REPEAT_TO_STATE’ property,the variableorg-todo-repeat-to-state if it is a string, theprevious TODO state iforg-todo-repeat-to-state ist, or the firststate of the TODO state sequence.
You can change this using the optionorg-log-repeat, or the‘STARTUP’ options ‘logrepeat’, ‘lognoterepeat’, and ‘nologrepeat’.With ‘lognoterepeat’, you will also be prompted for a note.
Previous:Inserting deadlines or schedules, Up:Deadlines and Scheduling [Contents][Index]