Next: , Previous: , Up: Extended Guile examples   [Contents][Index]


3.2.2 Weekly

The astute reader will have noticed that there are no next-week or next-week-from functions. This is because these concepts are fraught with ambiguity: does “next week” mean seven days from now, or next Sunday, or next Monday, or what? If the month does not start on a week boundary, are the first few days considered the first week, or does the first week begin on the first Sunday (or Monday)? This is important because, for example, trying to specify the second Thursday in a month might actually get the third one if the latter interpretation is held. Because of this we do not provide these functions.

If you really want a job to run every seven days, you could use code like

(job (lambda (current-time) (+ current-time (* 7 24 60 60)))
     "my-program")