cron question

Ben Escoto bescoto@stanford.edu
Wed, 31 Jul 2002 21:38:23 -0700


--==_Exmh_-966809314P
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> .http://arctic.org/~dean/rdiff-backup/unattended.html 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

--==_Exmh_-966809314P
Content-Type: application/pgp-signature

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

iD8DBQE9SLs++owuOvknOnURAtL0AJ9rHebRgO47aml8LHR0esj8L9FWNgCcDoWC
mAegSI/VuR3LppbHCdC2jzo=
=U0e3
-----END PGP SIGNATURE-----

--==_Exmh_-966809314P--