Next: Effort estimates, Previous: Deadlines and scheduling, Up: Dates and Times
Org mode allows you to clock the time you spent on specific tasks in a project. When you start working on an item, you can start the clock. When you stop working on that task, or when you mark the task done, the clock is stopped and the corresponding time interval is recorded. It also computes the total time spent on each subtree of a project.
:CLOCK: drawer (see also the variable
org-clock-into-drawer). When called with a C-u prefix argument,
select the task from a list of recently clocked tasks. With two C-u
C-u prefixes, clock into the task at point and mark it as the default task.
The default task will always be available when selecting a clocking task,
with letter d.
org-log-note-clock-out for the
possibility to record an additional note together with the clock-out
time stamp1.
org-remove-highlights-with-change) or press C-c C-c.
#+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file
#+END: clocktable
If such a block already exists at point, its content is replaced by the new table. The `BEGIN' line can specify options:
:maxlevel Maximum level depth to which times are listed in the table. :emphasize Whent, emphasize level one and level two items :scope The scope to consider. This can be any of the following: nil the current buffer or narrowed region file the full current buffer subtree the subtree where the clocktable is located treeN the surrounding level N tree, for exampletree3tree the surrounding level 1 tree agenda all agenda files ("file"..) scan these files file-with-archives current file and its archives agenda-with-archives all agenda files, including archives :block The time block to consider. This block is specified either absolute, or relative to the current time and may be any of these formats: 2007-12-31 New year eve 2007 2007-12 December 2007 2007-W50 ISO-week 50 in 2007 2007 the year 2007 today, yesterday, today-N a relative day thisweek, lastweek, thisweek-N a relative week thismonth, lastmonth, thismonth-N a relative month thisyear, lastyear, thisyear-N a relative year Use S-<left>/<right> keys to shift the time interval. :tstart A time string specifying when to start considering times :tend A time string specifying when to stop considering times :stepweekorday, to split the table into chunks. To use this,:blockor:tstart,:tendare needed. :link Link the item headlines in the table to their origins
So to get a clock summary of the current level 1 tree, for the current day, you could write
#+BEGIN: clocktable :maxlevel 2 :block today :scope tree1 :link t
#+END: clocktable
and to use a specific time range you could write2
#+BEGIN: clocktable :tstart "<2006-08-10 Thu 10:00>"
:tend "<2006-08-10 Thu 12:00>"
#+END: clocktable
#+BEGIN line of the dynamic block.
:block interval and update the table. The cursor
needs to be in the #+BEGIN: clocktable line for this command. If
:block is today, it will be shifted to today-1 etc.
The l key may be used in the timeline (see Timeline) and in the agenda (see Weekly/daily agenda) to show which tasks have been worked on or closed during a day.