Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"mt not found in $PATH" - via cron
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
pubecon
Guru
Guru


Joined: 03 Mar 2003
Posts: 342
Location: Glasgow, Scotland

PostPosted: Fri Mar 19, 2004 12:58 pm    Post subject: "mt not found in $PATH" - via cron Reply with quote

I have the flexbackup script running via cron as root

(and my mt exists as /usr/sbin/mt)

all is well when I run flexbackup from a terminal but all I get in my cron emails to root is

Code:
Errors:
 mt not found in $PATH


but it should be!!!



Code:
echo $PATH

    /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/3.3:/usr/X11R6/bin:
    /opt/blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin:/usr/qt/3/bin:/usr/kde/3.2/sbin:/usr/kde/3.2/bin:
    /usr/qt/2/bin


any ideas?


Last edited by pubecon on Fri Mar 19, 2004 1:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
Cocker68
Apprentice
Apprentice


Joined: 16 Jan 2003
Posts: 227
Location: Germany

PostPosted: Fri Mar 19, 2004 1:26 pm    Post subject: Reply with quote

In the cron environment the PATH variable is not set.
So in Your crontab specify all commands with their full paths.
This further implies, that scripts called by cron have also no idea about PATH. Either specify all commands in those scripts with full path name, or specify once at the beginning of the script a standard PATH.

- Cocker :wq


Last edited by Cocker68 on Tue Oct 05, 2004 4:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
pubecon
Guru
Guru


Joined: 03 Mar 2003
Posts: 342
Location: Glasgow, Scotland

PostPosted: Fri Mar 19, 2004 1:30 pm    Post subject: Reply with quote

excellent!

I find it mighty strange that there was no posts in the flexbackup mailing list nor a mention of this in the readme or faq...

many thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum