change shell type in crontab
diego.veiga_at_embraer.com.br
Date: 10/31/03
- Previous message: Andrea Dell'Amico: "Re: RH's imap server"
- Next in thread: Greg Bradner: "Re: change shell type in crontab"
- Reply: Greg Bradner: "Re: change shell type in crontab"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: redhat-list@redhat.com Date: Fri, 31 Oct 2003 12:43:40 -0200
The big problems is this.
i have this script:
--------------------->
#!/bin/bash
##########################################################################################
# program : _tools/sys_backup_pc08spt.bash
#
# subject : cria um arquivo de backup de todo o portal e transfere para a
maquina pc08spt#
##########################################################################################
. /home/rphp/.bash_profile
/app/portal_spt/htdocs/_tools/sys_funcs.bash
and go one...
--------------------->
the crontab line is this:
3 5 * * 1-6 `bash -login
/app/portal_spt/htdocs/_tools/sys_backup_samba.bash`
but after run the crontab i see in maillog this message:
/bin/sh: changed: command not found
the /bin/sh is a link to the /bin/bash
why the crontab is trying to run the script in sh...?
diego
----- Message from Cameron Simpson <cs@zip.com.au> on Fri, 31 Oct 2003
15:52:38 +1100 -----
To: redhat-list@redhat.com
Subject: Re: change shell type in
crontab
On 09:04 30 Oct 2003, diego.veiga@embraer.com.br
<diego.veiga@embraer.com.br> wrote:
| I would like to change the shell to execute the crontab (all the programs
| to execute are bash).
|
| the file /etc/crontab is:
| SHELL=/bin/bash
| PATH=/sbin:/bin:/usr/sbin:/usr/bin
| MAILTO=root
| HOME=/ ...
|
| But i?m receiving email with the crontab variable:
|
| X-Cron-Env: <LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH>
| X-Cron-Env: <SHELL=/bin/sh>
| X-Cron-Env: <HOME=/root>
| X-Cron-Env: <PATH=/usr/bin:/bin>
| X-Cron-Env: <LOGNAME=root>
| Status: RO
|
| /bin/sh: changed: command not found
Are you sure you've posted the complete crontab?
Anyway, if all the commands are separate scripts and each script starts
with:
#!/bin/bash
then the Right Thing should happen anyway.
I do wonder what you're doing that needs bash though...
-- Cameron Simpson <cs@zip.com.au> DoD#743 http://www.cskk.ezoshosting.com/cs/ The Fano Factor, where theory meets reality. Diego Brito Veiga Technical Publications Phone: +55 (12) 39278368 Fax: +55 (12) 39273342 -- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
- Previous message: Andrea Dell'Amico: "Re: RH's imap server"
- Next in thread: Greg Bradner: "Re: change shell type in crontab"
- Reply: Greg Bradner: "Re: change shell type in crontab"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|