[Chicago-talk] Is it running from cron?

Steven Lembark lembark at wrkhors.com
Thu Feb 22 14:42:12 PST 2007

> Couple hints - best to make a script and run that instead of a command, as
> you can alter the script as needed. You can also set all the vars you
> want. Modern (Vixie-ish) crons set some env vars (see
> man 5 crontab

Var's in crontab are minimal standard shell; you
may even find them in a web server. Easiest way to
make the executable internally cron-safe I've seen
is add a switch:

  frobnicate --crontab
  frobnicate --apache

Using an env var leaves the thing runnable but incorrect
on the cron side of life -- and dropping an extra row is
all too easy. With the switch at least the distinction
becomes part of the required command line so you either
get it or puke.

Steven Lembark                                         85-09 90th Street
Workhorse Computing                                  Woodhaven, NY 11421
lembark at wrkhors.com                                      +1 888 359 3508

More information about the Chicago-talk mailing list