Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weekly repeating tasks emacs org-mode

I want to track habits using org-mode. For example, I want to do exercise 3 times every week. Is there a way to schedule 3 times a task every week irrespective of the date in org-mode?

like image 876
18bytes Avatar asked Jan 05 '12 23:01

18bytes


1 Answers

You should be able to more or less do that using org habit tracking (See: Org-Habits).

To load org-habits you would need to add it to org-modules

(add-to-list 'org-modules "org-habit")

Then:

  1. Use C-c C-s to set SCHEDULED.
  2. Use C-c C-t to set your exercise TODO.
  3. Use C-c C-x p to have the STYLE Property habit (add in any other properties as desired as well).

Now the lines like this should have be appended after the title:

:PROPERTIES:
:STYLE: habit
:END:

A single habit should suffice, it will not be exactly 3 times per week, but over time it will average out to such. If you use a scheduled repeater that is .+2d/3d you will be prompted to perform the habit no more often than every second day, and no less often than every 3. (This averages out to 2.9 times per week if you continue it long enough. Over 6 weeks (42 days) you would complete it at least 14 times, at most 21, or 17.5 on average. 18 times in 6 weeks would be 3x per week).

Your final habit should look something like this initially, as you complete it DONE logging will be added in and the last-repeat will be kept track of as a property:

** TODO Exercise
SCHEDULED: <2012-01-06 Fri .+2d/3d>
:PROPERTIES:
:STYLE: habit
:END:

Note: If you get the error Symbol's value as variable is void: org-modules when trying to load the org-habit module, you might want to try the following instead:

(require 'org)
(require 'org-install)
(add-to-list 'org-modules "org-habit")
like image 130
Jonathan Leech-Pepin Avatar answered Nov 04 '22 06:11

Jonathan Leech-Pepin