Next: , Previous: , Up: Top   [Contents][Index]


5 Guile modules

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 primary function. It also introduces the facilities for accumulating a set of environment modifiers, which take effect when jobs run.