sawyl: (Default)
[personal profile] sawyl
Cron is driving me crazy. I've been looking into a problem whereby a whole bunch of my jobs have been failing because they're unable to find python. Fair enough, I thought, maybe I need to set the path explicitly from within the crontab, so I did.

It didn't help, but I have no idea why. Displaying the environment with printenv shows the path to be correct. Running python -c "import os; print os.environ['PATH']" reports the correct path but running python -c "import os; os.system('python2.4 -V')" fails even though the directory with python2.4 is blantantly in the path.

One for tomorrow, I think...
Updated: Turns out my problem was wood-for-the-trees related. When, rested and restored, I revisited the problem, I noticed that instead of adding the directory with the python2.4 binary in the path, I'd added the binary itself to the path. No wonder everything was hinky.

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 4th, 2026 11:52 am
Powered by Dreamwidth Studios