| Paste number 35581: | clon teaser |
| Pasted by: | mega1 |
| When: | 2 years, 5 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+RGD |
| Channel: | #lisp |
| Paste contents: |
;;; SCHEDULE is not mutated by iterating over it by NEXT-TIME. A
;;; SCHEDULER on the other hand is all about remembering the last
;;; time. The schedule here reads as: 'seconds 0, 15, 30 and 45 of
;;; every even minute that's between 10 and 40'.
(let ((schedule (clon:make-cron-schedule
:second (clon:make-typed-cron-bumper '(member 0 15 30 45))
:minute (clon:make-typed-cron-bumper '(and (integer 10 40)
(satisfies evenp))))))
(clon:schedule-function (lambda () (write-line "Hello world") (force-output))
(clon:make-scheduler schedule)
:thread t))
;;; It's in serious need of a terser syntax.
This paste has no annotations.