For instance, I have the following habit "sleep before 23h"

** TODO sleep before 23h                                  
   SCHEDULED: <2019-09-07 sam. 23:00 +1d>
   :STYLE: habit

And I mark it as DONE on my agenda each time I'm going to sleep. However, whether or not I've done it before 23h, org-habit considered it as done in time since it's day-based. Is there a trick to change its behaviour so that "sleeping after 23h" in this case is considered overdue?


For starters, my suggestion would be to use DEADLINE: rather than SCHEDULED:. See The Org Manual: Deadlines and scheduling for an explanation of the distinction. Namely:

SCHEDULED Meaning: you are planning to start working on that task on the given date.


DEADLINE Meaning: the task (most likely a TODO item, though not necessarily) is supposed to be finished on that date.

You may wish to set a SCHEDULED: value as well to reflect the earliest you anticipate going to bed.

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.