lispEn 2022-05-15 11:04:57

Schedule Tasks on Common lisp (cl-cron)

#lisp #commonlisp #cron #clcron #sbcl

Library cl-cron

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

We suggest using quicklisp for installation.

(ql:quickload "cl-cron")

(in-package :cl-cron)

Scheduling explained

    - 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.

(make-cron-job #'show-time)

Execute every hour like:










;; We need to define as:

(make-cron-job #'show-time

               :minute 0 :hour :every)

Start, restart and stop cron

After we defined our job we need to start, or maybe stop or restart.




También te podría interesar
lisp codeEn 2022-07-13 13:12:00
lispEn 2019-09-17 20:18:42
lispEn 2022-11-01 13:51:41
Common lisp is great because of who it is designed by...
lispmxEn 2017-12-26 12:17:40
lispEn 2022-12-06 15:05:07
In this post we will show the Common Lisp version and implementation you're using, from the REPL.