|MondoRescue HOWTO: Utilisation and Configuration of Mondo and Mindi under Linux (Version 3.0.4-r3113)|
|Chapter 7. HOWTO run mondo interactively using cron|
When a user submits a job with cron, their environment is not preserved. This is reasonable since cron jobs are typically ongoing and may be adversely affected if the user's environment changes subsequent to the cron submission. Thus, a cron job should call a script that set's up the correct environment before starting the user's desired program. The 'at' command does this nicely.
When a job is started with cron, it runs as a background process. No interaction with the program is possible (unless it is capable of interacting via a FIFO or some such) except termination via its pid. The only program that I know of that allows such interaction and serves as a wrapper for other processes is 'screen'
There's one little problem with screen though. It expects to attach to a terminal when it first starts. This won't happen under cron so screen will fail. Fortunately, screen comes with a "start detached" (-d) option.