org-mode schedule weekly event for a period

emacs, org-mode

Solution

I had a similar problem and found usefull the answer to "How can I create more complex appointments in my org-files?" in the FAQ at http://orgmode.org/worg/org-faq.html#Appointments/Diary You can even add exceptions for holidays. I was not able to make work the time though: when you add it the formula stops working :(

1) My example: Courses on Tuesdays and Thursdays falling in [2011-03-07 Mon]--[2011-06-25 Sat] minus [2011-05-15 Sun]--[2011-05-20 Fri] (a week of holiday):

** TEST Tuesday and Thursday in [2011-03-07 Mon]-[2011-06-20 Mon] minus holidays [2011-05-15 Sun]-[2011-05-22 Sun]
<%%(and (diary-block 3 7 2011 6 20 2011)(or (= 2 (calendar-day-of-week date) (= 4 (calendar-day-of-week date))))(not (diary-block 5 15 2011 5 22 2011)))>

If you decompose the boolean function, you get the following, which is self explanatory:

<%%(and (diary-block 3 7 2011 6 20 2011) 
(or (= 2 (calendar-day-of-week date) (= 4 (calendar-day-of-week date))))  
(not (diary-block 5 15 2011 5 22 2011))
)>

2) My suggestion for your case: a class every Tuesday every week from March to June (I took the liberty to fix the year to 2011):

<%%(and (= 2 (calendar-day-of-week date)) (diary-block 3 23 2011 6 23 2011)))>

You might want to have a look to the newly added section "How can I schedule a weekly class that lasts for a limited period of time?", about the function "org-diary-class", but it still seems to have problem with scheduling hours :(

Hope it helps,

Problem

I would like to use agenda to keep track of my classes, assuming i have a com 355 class every week from march to june, ``` <2010-03-23 Tue 10:40-12:10 +1w> ``` this works but it schedules it indefinitely if i use, ``` <2010-03-23 Tue 10:40-12:10 +1w>-<2010-06-23> ``` it gets scheduled for everyday from march to june, how can i schedule this once a week for a period of time?

Original source