crontab:
script:CRON = 1 15 * * * * myscript.pl
Of course, that depends on the variable being set in the crontab file.#!/usr/local/bin/perl if ($ENV{CRON}) { print STDERR "Running in cron.\n"; } else { print "Not running in cron.\n"; }
In reply to Re: Detecting running from cron?
by chipmunk
in thread Detecting running from cron?
by oakley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |