Next: , Previous: , Up: Extended Guile examples   [Contents][Index]

3.2.1 Synthesizing “at” commands

The current implementation of mcron does not provide for an at command (a command-line program that allows the user to specify that a job runs exactly once at a certain time). This can, however, be achieved.

Suppose the program my-program needs to be run at midnight tonight. A Guile script like the following would work (but a printed schedule, obtained with the --schedule option, will show superfluous entries).

(job '(next-day)
     (lambda () (system "my-program")
                (kill (getppid) SIGINT)))