cron question

Ben Escoto
Wed, 31 Jul 2002 21:38:23 -0700

Content-Type: text/plain; charset=us-ascii

>>>>> "J" == jcapps  <Jeremy>
>>>>> wrote the following on Wed, 31 Jul 2002 17:11:56 -0700

  J> Hopefully other people have had this issue setting up a cron job.
  J> I am using RH 7.1 machines and have ironed out the ssh issues (
  J> . was a great
  J> resource) the rdiff-backup command works great at not needing
  J> authentication when run.  But when added to crontab the job
  J> fails, cron sends me notification " /usr/bin/env: python2.2: No
  J> such file or directory. "  This is obviously because cron can't
  J> see the env file right?  I mean, the file /usr/bin/env is
  J> definitely there.  I read something about cron jobs dropping out
  J> of paths because its own path is shorter?  Any input would be
  J> helpful- I am scanning through the archives on all cron related
  J> material- Thanks

Actually it looks like it is because env isn't finding python2.2:

~ $ env asoenuthaos
env: asoenuthaos: No such file or directory
~ $ 

So probably "python2.2" is in your ordinary path (maybe
/usr/local/bin), but cron is running things under a restricted path
that omits that directory.  Perhaps you could have cron call a wrapper
script that sets a more liberal path and runs rdiff-backup under these
settings (you could also just edit the first line to
"#!/usr/local/bin/python2.2", but you'll also have to get "rdiff" in
your path since you are running 0.8.x it seems, and that wouldn't fix
the rdiff path problem if there is one).

Ben Escoto

Content-Type: application/pgp-signature

Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Exmh version 2.5 01/15/2001