Some of the key parts of mcron are implemented as modules so they can be incorporated into other Guile programs, or even into C-sourced programs if they are linked against libguile.
It may be, for example, that a program needs to perform house-keeping functions at certain times of the day, in which case it can spawn (either fork or thread) a sub-process which uses a built-in mcron. Another example may be a program which must sleep until some non-absolute time specified on the Gregorian calendar (the first day of next week, for example). Finally, it may be the wish of the user to provide a program with the functionality of mcron plus a bit extra.
The base module maintains mcron’s internal job lists, and provides the main wait-run-wait loop that is mcron’s main function. It also introduces the facilities for accumulating a set of environment modifiers, which take effect when jobs run.
• The base module: | The job list and execution loop. | |
• The redirect module: | Sending output of jobs to a mail box. | |
• The vixie-time module: | Parsing vixie-style time specifications. | |
• The job-specifier module: | All commands for scheme configuration files. | |
• The vixie-specification module: | Commands for reading vixie-style crontabs. |