I want to know how can I set a repetitive task for only a range of days of the week, for instance from Monday to Friday only.
The great org-habit module lacks a way to handle a very common type of habits, those that can/may/must be executed only on certain weekdays. There exist several workarounds like creating a habit for each day of interest, but they are less flexible and spoil the beauty of Org.
This little enhancement aims to fill the gap. It’s a fork of the original org-habit module and most of the internals are left untouched.
The desired minimum.
How it works
As simple as specifying the weekdays (1 = Monday, 7 = Sunday, space separated), on which a habit is expected to be performed, in the :HABIT_WEEKDAYS: property.
Expect consistent behaviour only for “.+”-style habits. The “+”- and “++”-style habits are better, at least for now, to be used the original way.
I was currently searching for the same functionality and came across this solution from org-mode FAQ
** Daily meeting <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))>
It works for me. I am using Emacs 27.1 on Debian 11.