Previous: , Up: Guile modules   [Contents][Index]


5.5 The vixie-specification module

To use this module, put the command (use-modules (mcron vixie-specification)) into your program.

This module exports a couple of functions for adding jobs to the internal job list according to a Vixie-style crontab file.

Scheme procedure: read-vixie-port port . parse-line

This procedure reads a crontab from the given port, and adds jobs to the job list accordingly, taking care of environment specifications and comments which may appear in such a file.

parse-line should not normally be used, except that if you are parsing a (deprecated) /etc/crontab file with a slightly modified syntax, you may pass the value parse-system-vixie-line as the optional argument.

Scheme procedure: read-vixie-file name . parse-line

This procedure attempts to open the named file, and if it fails will return silently. Otherwise, the behaviour is identical to read-vixie-port above.

Once this module has been declared in a program, a crontab file can be used to augment the current job list with a call to read-vixie-file.