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))))
SCHEDULED
in Org mode means something different than e.g. scheduling a meeting. See the discussion in the manual, particularly the disclaimer markedImportant
. E.g. if you have a meeting at 11am every MWF, then you probably should not mark itSCHEDULED
, you should just use a timestamp. It's not clear from your example whether you want/needSCHEDULED
or not, so I thought I'd point that out. – NickD May 8 '20 at 1:09