0

I would like to schedule a todo item every Monday, Wednesday, Friday.

I followed this one: Org-mode schedule 1 event for multiple days?

and get something like this:

* stuff to do
SCHEDULED: <Monday 4/5/2020 +1w><Wed 6/5/2020 +1w><Fri 8/5/2020 +1w>

This doesnt show up on my agenda. So I think the way I write it down is wrong. Could anyone give some pointers?

  • Not directly related to your question but SCHEDULED in Org mode means something different than e.g. scheduling a meeting. See the discussion in the manual, particularly the disclaimer marked Important. E.g. if you have a meeting at 11am every MWF, then you probably should not mark it SCHEDULED, you should just use a timestamp. It's not clear from your example whether you want/need SCHEDULED or not, so I thought I'd point that out. – NickD May 8 '20 at 1:09
1

One idea would be to create a custom function that tests for specified days of the week. The following example is hard-coded to return t for Monday (i.e., 1), Wednesday (i.e., 3) and Friday (i.e., 5).

This can be used in an org-mode file such as:

* My Task
  SCHEDULED: <%%(diary-monday-wednesday-friday date)>

Or, it can be used in a diary file and seen in the agenda view with (setq org-agenda-include-diary t) using a diary entry such as:

%%(diary-monday-wednesday-friday date) Monday or Wednesday or Friday

CODE:

(require 'calendar)

;;; ORG-MODE:  * My Task
;;;              SCHEDULED: <%%(diary-monday-wednesday-friday date)>
;;;
;;; DIARY:  %%(diary-monday-wednesday-friday date) Monday or Wednesday or Friday
;;;
;;; See also:  (setq org-agenda-include-diary t)
;;;
;;; (diary-monday-wednesday-friday '(5 7 2020)) => nil
;;;
;;; (diary-monday-wednesday-friday '(5 8 2020)) => t
;;;
;;; 0 => Sunday
;;; 1 => Monday
;;; 2 => Tuesday
;;; 3 => Wednesday
;;; 4 => Thursday
;;; 5 => Friday
;;; 6 => Saturday
;;;
(defun diary-monday-wednesday-friday (date)
"Return `t` if DATE is a Monday, Wednesday or Friday."
  (let ((day-of-week (calendar-day-of-week date)))
    (member day-of-week '(1 3 5))))
  • Such diary-style expressions are discussed in the Org mode manual: see Timestamps for the timestamp use and Weekly/Daily Agenda for the anniversary/birthday/etc use, which can be done even without including the diary. – NickD May 8 '20 at 1:35
1

If this is really an appointment reminder, rather than a scheduled task, then the easiest thing to do is to forego the SCHEDULED: marker and just have the three timestamps listed (I like putting the timestamps on different lines, but you can put them on a single line if you want):

* stuff to do
  <Monday 4/5/2020 +1w>
  <Wed 6/5/2020 +1w>
  <Fri 8/5/2020 +1w>

Assuming that the file is indeed an agenda file, stuff to do will appear in the agenda every Monday, Wednesday and Friday.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.