#lisp #commonlisp #cron #clcron #sbcl
cl-cron is a simple cron like library that allows you to set up cron-like jobs and run them at predetermined times. The library has been tested on SBCL so far.
To see the documentation or download the file goto http://quickdocs.org/cl-cron/api
We suggest using quicklisp for installation.
- minute (from 0 to 59)
- hour (from 0 to 23)
- day of month (from 1 to 31)
- month (from 1 to 12) (January=1)
- day of week (from 0 to 6) (Monday=0)
By default each item is equal to every, for instance :minute :every it means run the job every minute.
Execute every minute
;; the 'show-time my hypothetical job, you can define another function whatever you want.
Execute every hour like:
;; We need to define as:
:minute 0 :hour :every)
Start, restart and stop cron
After we defined our job we need to start, or maybe stop or restart.