Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ciel-lang/cl-cron
A simple tool that provides cron like facilities directly inside of common lisp.
https://github.com/ciel-lang/cl-cron
Last synced: 2 months ago
JSON representation
A simple tool that provides cron like facilities directly inside of common lisp.
- Host: GitHub
- URL: https://github.com/ciel-lang/cl-cron
- Owner: ciel-lang
- License: gpl-3.0
- Created: 2020-10-13T15:58:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-22T13:27:25.000Z (9 months ago)
- Last Synced: 2024-04-16T03:25:31.499Z (3 months ago)
- Language: Common Lisp
- Size: 27.3 KB
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: COPYING
Lists
- awesome-cl - cl-cron - A simple tool that provides cron like facilities. [GPL3][2]. (Offline ## / Third-party APIs)
- curated-awesome-cl - cl-cron - A simple tool that provides cron like facilities. (Python ##)
README
# cl-cron
A simple tool that provides cron like facilities directly inside of common lisp.
a fork of https://bitbucket.org/mackram/cl-cron (unavailable)
Install with Quicklisp:
(ql:quickload "cl-cron")
Note: Quicklisp points to this repository since the release of October, 2021.
Example:
Print a message every minute.
~~~lisp
(defun say-hi ()
(print "Hi!"))(cl-cron:make-cron-job #'say-hi)
(cl-cron:start-cron)
~~~Wait a minute to see output.
Stop all jobs with `stop-cron`.
## API
```lisp
(make-cron-job function-symbol &key (minute :every) (step-min 1) (hour :every) (step-hour 1) (day-of-month :every)(delete-cron-job cron-key)
(time-to-run-job job)
start-cron
restart-cron
stop-cron
```Example:
~~~lisp
(cl-cron:make-cron-job
(lambda ()
(format t "Wake Up!~%"));; Days of week are numbered from 0,
;; where 0 is Monday.
;; Run every Sunday:
:day-of-week 6
:hour 10
:minute 0
;; hash-key is the name
:hash-key :sunday-alarm)(cl-cron:delete-cron-job
:sunday-alarm)
~~~https://40ants.com/lisp-project-of-the-day/2020/06/0087-cl-cron.html
## Changelog
- 2020-10-13: we added a name to the cl-cron thread.
Licence: GPL