public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Help With Cron
@ 2007-04-10 22:20 Drew Tomlinson
  2007-04-10 22:38 ` [gentoo-user] Help With Cron -- SOLVED Drew Tomlinson
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Tomlinson @ 2007-04-10 22:20 UTC (permalink / raw
  To: gentoo-user

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: mythtv@tv.mykitchentable.net
Date: Tue, 10 Apr 2007 15:07:01 -0700
To: drew@mykitchentable.net
Subject: Cron <mythtv@tv> /usr/share/mythtv/mythrename.pl --format "
X-Cron-Env: <MAILTO=drew@mykitchentable.net>
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: <20070410220701.655A716495E@blacklamb.mykitchentable.net>

/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?

Thanks,

Drew

-- 
Be a Great Magician!
Visit The Alchemist's Warehouse

http://www.alchemistswarehouse.com

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-user] Help With Cron -- SOLVED
  2007-04-10 22:20 [gentoo-user] Help With Cron Drew Tomlinson
@ 2007-04-10 22:38 ` Drew Tomlinson
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Tomlinson @ 2007-04-10 22:38 UTC (permalink / raw
  To: gentoo-user

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: mythtv@tv.mykitchentable.net
> Date: Tue, 10 Apr 2007 15:07:01 -0700
> To: drew@mykitchentable.net
> Subject: Cron <mythtv@tv> /usr/share/mythtv/mythrename.pl --format "
> X-Cron-Env: <MAILTO=drew@mykitchentable.net>
> 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: <20070410220701.655A716495E@blacklamb.mykitchentable.net>
>
> /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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-10 23:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-10 22:20 [gentoo-user] Help With Cron Drew Tomlinson
2007-04-10 22:38 ` [gentoo-user] Help With Cron -- SOLVED Drew Tomlinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox