Bug 404154 - Cron does not invoke folder /usr/local/bin (only /usr/bin)
Summary: Cron does not invoke folder /usr/local/bin (only /usr/bin)
Status: RESOLVED INVALID
Alias: None
Product: openSUSE 10.2
Classification: openSUSE
Component: Other (show other bugs)
Version: Final
Hardware: Other Other
: P5 - None : Minor with 5 votes (vote)
Target Milestone: ---
Assignee: Matthias Koenig
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-26 15:20 UTC by Wiki Melancholie
Modified: 2008-07-17 15:47 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wiki Melancholie 2008-06-26 15:20:50 UTC
Pre-note: This occurs with openSUSE 10.1 (on a V-Server), but I think this probably would also happen with 10.x and 11.0! If so, this should be fixed in v11.

The original version of Python was 2.4.2, too old for me. So I installed Python 2.5.2 by using 'make'.

If I am typing "python -V" it shows me 2.5.2.
If I create a shell script containing "python -V" it also shows me 2.5.2.

But if I add that script to my cronjobs, it will output 2.4.2! Oddly, the file "/usr/bin/python2.4" is used then! Why does "python" use/link to "python2.4" instead of "python2.5" if run by cron?

Directly running "python2.5" or "/usr/local/bin/python" works though ;-)
Comment 1 Wiki Melancholie 2008-06-27 13:31:48 UTC
Oh, stating "python2.5" does not work either with cron.

The reason is that cron only uses /usr/bin/python(2.4) (but not /usr/local/bin/python(2.5))!

Shouldn't cron be allowed to use also /usr/local/bin versions?
Comment 2 Matthias Koenig 2008-07-17 15:47:15 UTC
No, the default path is intentionally restricted.
But you can set the PATH environment variable in your crontab, for example
to
PATH=/usr/local/bin:/usr/bin:/bin