|
|
| sheller 2006-01-02, 7:50 am |
| Hi all
The following mail works in command line.
mail myname@hotmail.com < i.file
But the following line put in a file "test"
20 5 * * * mail myname@hotmail.com < i.file
doesn't work with
crontab test
Can any one explain please? I use Redhat Linux 8.
Thanks.
-arasu
| |
| Randolf Balasus 2006-01-02, 7:50 am |
| sheller wrote:
> Hi all
>
> The following mail works in command line.
>
> mail myname@hotmail.com < i.file
>
> But the following line put in a file "test"
>
> 20 5 * * * mail myname@hotmail.com < i.file
>
> doesn't work with
>
> crontab test
>
> Can any one explain please? I use Redhat Linux 8.
>
> Thanks.
>
> -arasu
it seems you need the absolute path to the files ? where is "i.file"
located ?
Greetings Randolf Balasus
| |
| base60 2006-01-02, 5:58 pm |
| sheller wrote:
> Hi all
>
> The following mail works in command line.
>
> mail myname@hotmail.com < i.file
>
> But the following line put in a file "test"
>
> 20 5 * * * mail myname@hotmail.com < i.file
>
> doesn't work with
>
> crontab test
>
> Can any one explain please? I use Redhat Linux 8.
"mail" is found via the PATH environment variable set at login.
You should be using an absolute path.
| |
| sheller 2006-01-02, 8:50 pm |
| Greetins. the i.file is in where I give the
crontab command. i.e. myhome/share. Is it still
wrong? Thanks
-arasu
>sheller wrote:
>it seems you need the absolute path to the files ? where is "i.file"
>located ?
>
>Greetings Randolf Balasus
>
>
| |
| Chris F.A. Johnson 2006-01-03, 2:50 am |
| On 2006-01-03, sheller wrote:
[please don't top post]
[vbcol=seagreen]
> Greetins. the i.file is in where I give the
> crontab command. i.e. myhome/share. Is it still
> wrong?
The crontab only intalls the cron command that you give it; it
doesn't change where cron runs the command. Put the full path to
the file in the command itself.
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
| |
| sheller 2006-01-03, 7:50 am |
| Thanks again. It works when I give the full path in
the machine at my university. The same not working
in my personal linux after giving the full path. Not sure
what's to be done. Thanks.
-arasu
>On 2006-01-03, sheller wrote:
>
>[please don't top post]
>
>
> The crontab only intalls the cron command that you give it; it
> doesn't change where cron runs the command. Put the full path to
> the file in the command itself.
>
>--
> Chris F.A. Johnson, author | <<a href="http://cfaj.freeshell.org">http://cfaj.freeshell.org</a>>
> Shell Scripting Recipes: | My code in this post, if any,
> A Problem-Solution Approach | is released under the
> 2005, Apress | GNU General Public Licence
>
>
|
|
|
|