|Perl Monk, Perl Meditation|
Perl & cron job environmental variablesby Anonymous Monk
|on Jul 02, 2007 at 20:14 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
I have to use Perl in a "cron" job.
However, my environmental variables seem not to export to Perl (but they do seem to export to csh.) Running the following "cron" job:
/usr/bin/csh -c printenv
Produces the correct set of environmental variables.
However, the Perl script "cron" job:
where the code is simply:
produces a much shorter list of variables and a shorter path. I am running Solaris.
What is the recommended "fix" for this problem?
Is there any easy way to force cron to export all variables?