crontab related
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > crontab related




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    crontab related  
sheller


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-08-06 01:49 AM

My crontab command in RedHat 8 is

*/1 * * * * /home/arasuk/share_file/searcha

The above command works fine with the following
simple script put in "searcha"  (executable)

#!/bin/sh
ls

. But not with the following

#!/bin/sh
cp r.file r.out

This latter script work in command line. I give absolute path
to the command. Any clue for the latter to work?

Thanks.

-arasu







[ Post a follow-up to this message ]



    Re: crontab related  
JohnK


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-08-06 10:57 PM

sheller wrote:
>
> #!/bin/sh
> cp r.file r.out

Are you making an assumption about the working directory?

Try

cp /path/to/file/r.file /path/to/file/r.out

JohnK





[ Post a follow-up to this message ]



    Re: crontab related  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-08-06 10:57 PM

In article <dppmco$eea$1@bunyip2.cc.uq.edu.au>,
"sheller" <arasu@uq.edu.au> wrote:

> My crontab command in RedHat 8 is
>
> */1 * * * * /home/arasuk/share_file/searcha
>
> The above command works fine with the following
> simple script put in "searcha"  (executable)
>
> #!/bin/sh
> ls
>
> . But not with the following
>
> #!/bin/sh
> cp r.file r.out

What error does it get?

>
> This latter script work in command line. I give absolute path
> to the command. Any clue for the latter to work?

If it complains "file not found", it's probably because cron isn't
running the script in the directory you expect.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:12 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register