On 4/10/2007 3:20 PM Drew Tomlinson wrote:
My cron program is sys-process/vixie-cron-4.1-r9 and all cron jobs but
one are running as I expect. Specifically, I want the following
command to execute from cron:
/usr/share/mythtv/mythrename.pl --format "%T %- %Y-%m-%d_%g-%i %A %-
%S" --link /tv/pretty
However it fails to run and I get this error message emailed to me
from cron:
From: [EMAIL PROTECTED]
Date: Tue, 10 Apr 2007 15:07:01 -0700
To: [EMAIL PROTECTED]
Subject: Cron <[EMAIL PROTECTED]> /usr/share/mythtv/mythrename.pl --format "
X-Cron-Env: <[EMAIL PROTECTED]>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/mythtv>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=mythtv>
X-Cron-Env: <USER=mythtv>
Message-Id: <[EMAIL PROTECTED]>
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
So I suspected the quotes in my command line might be the problem and
I removed the '--format " ..."' part. Thus my command looked like this:
/usr/share/mythtv/mythrename.pl --link /tv/pretty
But still I received email with the same error.
I don't understand what cron doesn't like. The command runs just fine
as the user from the command line. Can someone please point me in the
right direction?
Never mind. Although I was editing the crontab with 'crontab -e', I
wasn't exiting out of my editor between edits. I was only hitting the
save button. Thus because I didn't actually exit the editor, the
updated crontab was not getting installed. Sorry for the noise.
Thanks,
Drew
P.S. Yes, the problem was with the quotes as I suspected earlier.
Escaping the quotes (\") solved the problem.
--
Be a Great Magician!
Visit The Alchemist's Warehouse
http://www.alchemistswarehouse.com
--
gentoo-user@gentoo.org mailing list