21

I'm using org-mode to schedule tasks.

Is there a straightforward way to schedule a task that occurs on the first Saturday of every month?

3 Answers 3

18

org-float is now obsolete (see this commit). From now on, you'll have to use diary-float in place of org-float.

(Sorry for the noise: this does not deserve a full answer, but for now I don't have enough "reputation" to comment.)

12

Org Mode has a great documentation, use it. (info "(org) Deadlines and scheduling")

You may use timestamps with repeaters in scheduling and deadline entries. Org mode will issue early and late warnings based on the assumption that the timestamp represents the nearest instance of the repeater. However, the use of diary sexp entries like `<%%(diary-float t 42)>' in scheduling and deadline timestamps is limited. Org mode does not know enough about the internals of each sexp function to issue early and late warnings. However, it will show the item on each day where the sexp entry matches.

* My Task
  <%%(diary-float t 6 1)>
5
  • 1
    Thanks. I did look at the documentation, but until a google search I did a few moments ago, I didn't know what a Diary-style sexp entry was -- so I glanced over the relevant section. Thanks again! Nov 27, 2012 at 9:49
  • 1
    the sexp should be (org-float t 6 1)
    – cfy
    Dec 7, 2012 at 1:54
  • 4
    Be sure to note nberth's "answer" below: org-float is now obsolete and you need to use diary-float, which has a slightly different syntax. Sep 4, 2014 at 12:36
  • This solution and the documentation in the "repeating tasks" section leave a lot to be desired when using this function along side agenda views. On top of a lack of early and late warnings, you lose the ability to mark a single instance of a repeated task done. Instead, it will mark the entire task done and no longer repeat. The answer by cfy resolves these issues, albeit with a fair amount of custom code.
    – Metropolis
    May 5, 2022 at 14:53
  • This information is in the section "Deadlines and scheduling", not in "Repeated tasks", where you (I) would look for it - I couldn't find it either...
    – AstroFloyd
    Jun 1 at 15:23
12

Using sexp in scheduling and deadline timestamp is limited,like info says

Org mode does not know enough about the internals of each sexp function to issue early and late warnings.

I write a elisp code to change the timestamp automatically,with it,all you need to do is setting a property.

the elisp code is here

  1. add (load "/path/to/next-spec-day") to your dot emacs file.

  2. set NEXT-SPEC-DEADLINE and/or NEXT-SPEC-SCHEDULED property of a TODO task,like this:

    * test
      :PROPERTIES:
      :NEXT-SPEC-SCHEDULED: (org-float t 6 1)
      :END:
    

    The value of NEXT-SPEC-SCHEDULED is a sexp will return non-nil if date is the first Saturday of the month

  3. Then,when you change the TODO state of that tasks,the timestamp will be changed automatically(include lead time of warnings settings).It becomes:

    * TODO test
      SCHEDULED: <2013-01-05 Sat>
      :PROPERTIES:
      :NEXT-SPEC-SCHEDULED: (org-float t 6 1)
      :END:
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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