CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
%ENV variables not picked up when run from crontab

 



Adrian
New User

Oct 23, 2006, 5:43 AM

Post #1 of 2 (745 views)
%ENV variables not picked up when run from crontab Can't Post

Hi,

when using the predefined hash %ENV some variables are not found if the script is run from a crontab.

$HOME = $ENV{'HOME'};

works fine, but;

$user = $ENV{'USER'};

produces no result.

why is that?

thanks,
Ad


Adrian
New User

Oct 23, 2006, 5:52 AM

Post #2 of 2 (744 views)
Re: [Adrian] %ENV variables not picked up when run from crontab [In reply to] Can't Post

found a solution to my problem anyway, use:

$user = $ENV{'LOGNAME'};

this still works when script is called from a crontab.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives