[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: curl -g and crontab

What does /var/log/cron say?  The error should have been listed there if
there is a permission error or you should have received an email in that
user's mailbox (whoever you are running the cron as).

But I think your problem is PATH.  When running scripts in cron, you should
always specify full paths to programs you reference in the scripts.  In this
case, full path to curl and tar.

or just set the PATH variable in your shell script.

-Frank Ng

On 2/10/06, Yixin Luo <luoyixin gmail com> wrote:
> Hello.
> We put the a following script file - yixin.sh in the crontab. After
> crontab
> running, new folders have been build but no files downloaded in those
> folders.  If we run the script manually, the files could be downloaded in
> these folders.
> yixin.sh
> "mkdir /home/dj/share/yixin/`date +%Y%m%d`
> cd /home/dj/share/yixin/`date +%Y%m%d`
> export nb=`date +%Y%m%d`
> export URL="
> ftp://starfish.mar.dfo-mpo.gc.ca/pub/ocean/btoulany/GoMOOS/products";
> curl -g $URL/run-$nb\00.tar.gz -o run-$nb\00.tar.gz
> tar -zxvf run-$nb\00.tar.gz
> rm *tar.gz -rf
> "
> Here is our crontab file.
> 01 09 * * * /home/wam/yixin.sh
> Thanks in advance.
> yixin
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request redhat com?subjectunsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]