[Pythonmac-SIG] py-appscript problem in crontab
Ned Deily
nad at acm.org
Fri Feb 29 05:29:19 CET 2008
In article <47C775CE.1010005 at wheel.org>,
tom wible <airdrummer at wheel.org> wrote:
> i give up: crontab no longer executes python:-P
>
>
> 33 21 * * * /usr/bin/osascript
> /DVR/scripts/noLiveEyeTV.scpt
>
> works fine:
>
> From dvr at wiblesdvr.localhost Thu Feb 28 21:33:02 2008
> From: dvr at wiblesdvr.localhost (Cron Daemon)
>
> but
>
> 52 21 * * * /DVR/scripts/noLiveEyeTV.py
>
> doesn't...even if it failed, i would have gotten email, as i did when i 1st
> started...wtf?
In your first posting, your script was written using /usr/bin/env:
#! /usr/bin/env python
That leaves you at the mercy of whatever PATH has been set to.
Suggest you change the cron table entry to explicitly invoke the python
you want, so (all on one line, of course):
52 21 [...]
/Library/Frameworks/Python.framework/Versions/2.5/bin/python
/DVR/scripts/noLiveEyeTV.py
The MacPython installer creates symlinks in /usr/local/bin:
$ ls -l /usr/local/bin/python
lrwxr-xr-x 1 root wheel 68 Feb 23 15:45 /usr/local/bin/python ->
../../../Library/Frameworks/Python.framework/Versions/2.5/bin/python
so the crontab line could be simplified to:
[...] /usr/local/bin/python /DVR/scripts[...]
--
Ned Deily,
nad at acm.org
More information about the Pythonmac-SIG
mailing list