Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

scron

  1. Outdated egg!
  2. scron
    1. Introduction
    2. Author
    3. Usage
    4. License
    5. Version history
      1. Version 0.2
      2. Version 0.1

Introduction

scron is a very simplified cron-like program which executes Scheme jobs.

Author

O.S. Systems, maintained by Mario Domenech Goulart

Usage

 $ scron -h
 Usage: scron <basedir>

<basedir> is the directory where the time-interval tree of "scrontab" files can be found (files whose extension is scm). The time-interval directory indicates the interval between two consecutive scron runs in seconds. So, for example, if the time-interval directory is 5, scron will run the scrontab files in that directory in 5 seconds intervals.

Example:

 $ ls -l scron/
 total 0
 drwxr-xr-x 2 mario mario 48 Fev 13 09:11 5
 
 $ ls -l scron/5/
 total 4
 -rw-r--r-- 1 mario mario 189 Fev 13 09:16 hello.scm
 
 $ cat scron/5/hello.scm 
 (use posix)
 
 (with-output-to-file (make-absolute-pathname "tmp" "hello.log")
   (lambda ()
     (print "Hello!  It's "
            (time->string (seconds->local-time (current-seconds)))))
   append:)
 
 
 $ scron scron &

That'd generate a /tmp/hello.log file with a "Hello! It's <time>" line for each 5 seconds interval.

License

BSD

Version history

Version 0.2

Version 0.1