Version 0 of cron

Updated 2001-11-10 10:34:57

Purpose: discuss some of the connections between Tcl and the cron facility

Cron is an application available on many platforms designed to allow one to schedule invocations of applications at set calendar date and times on a computer.

When an application is invoked, it appears to run as a particular user, BUT with a minimal environment variable setup and typically in a preset command shell.

The limited environmental shell setup is the first problem users typically encounter - they expect that they will find various variables that are set during their machine's startup environment during login, or their own personalized login environment - but those are not present.

Thus one must decide to take one of two courses of action:

  • write the application in such a way that it needs no special variables
  • set the special variables up that may be needed
  • create some sort of wrapper application that presets the operational environment

What kinds of variables might be needed? Well, for instance, special $PATH values, database pointer variables, printer names, etc. all may need to be set up.

What else can go wrong?

Some applications expect certain terminal settings - some place to write output, some place to prompt for input, perhaps access to some other special device (like an X Window display!). It is often the user will find that they have dependencies (via subroutines or other invoked applications) that they weren't even aware existed.