Get_gfs.pl and Cronjob

Eric Altshuler ela at COLA.IGES.ORG
Fri Mar 7 15:37:05 EST 2008


Hi Amelia,

Your problem may be related to the PATH setting that's used when cron runs your script. When you run the script interactively, your .profile (or .cshrc) sets the PATH variable, and apparently it includes /usr/local/bin since the shell is able to find curl. However, user dotfiles aren't automatically executed when cron runs, so if /usr/local/bin is not in the PATH setting in the default system dotfiles, you need to add it to your script, e.g.

export PATH=$PATH:/usr/local/bin

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793


----- Original Message -----
From: "amelia graziano" <ameliagraziano at TISCALINET.IT>
To: GRADSUSR at LIST.CINECA.IT
Sent: Friday, March 7, 2008 8:29:38 AM GMT -05:00 US/Canada Eastern
Subject: Re: Get_gfs.pl and Cronjob

Patrick,

Thanks a lot. Using log.err.getgfs I released that under 3get_gfs.pl
the location of "curl" was wrong.

the wrong one was $curl="curl";
Correct was $curl="/usr/local/bin/curl";

Amelia

At 14:00 07/03/2008, you wrote:
>Hi there,
>
>if you want some help from the list or me, you have to be a lot more
>precise. What is not working ? Does the cron job work ? (Maybe a '
>echo "here-1 ">>log ' would tell you if the logfile is working .. do
>you get error messages ? )
>
>try also
>
>/directory/3get_gfs.pl data 20$yar$mon$day$start 0 120 3 all 'UGRD.10
>m above ground|VGRD.10 m above ground' /outputDir   1>
>/directory/log.out.getgfs 2> /directory/log.err.getgfs
>
>And look at the content of the of the /directory/log.out.getgfs
>a/directory/log.err.getgfsnd files after the cron ...
>
>Cheers
>   Patrick



More information about the gradsusr mailing list