Re: Cron Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rgheck writes:


Hi,

Here is a line from my cron file:

55 2,4,6,8,10,12,14,16,18,20,22 * * * audiogon.pl -f /tmp/rss/bw.xml 'http://cgi.audiogon.com/cgi-bin/srch_fs.pl?WORD=b%26w&FOCUS=EXY&CTGSK=spkrfull&submit=Search'

It doesn't matter here what the audiogon.pl script does. (It scrapes the URL given and creates an RSS feed.) The problem is that this will not run.

/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file

The subject line of the email reads:

Cron <rgheck@rghquad> /home/rgheck/bin/audiogon.pl -f /tmp/rss/bw.xml 'http://cgi.audiogon.com/cgi-bin/srch_fs.pl?WORD=b

So the problem seems to be the embedded "%26" in the command: Thats is the URL-encoding for the ampersand (we're searching for "B&W" loudspeakers). But even the single-quotes seem not to be protecting it from the shell. And is it relevant that it encodes the ampersand? Or is it the "%" that is causing the problem?

Whichever it is, does anyone know how this can be made to run?

From the crontab(5) manual page reads:

      The "sixth" field (the rest of the line) specifies the  command  to  be
      run.   The  entire  command  portion  of the line, up to a newline or %
      character, will be executed by /bin/sh or by the shell specified in the
      SHELL  variable  of  the  cronfile.   Percent-signs (%) in the command,
      unless escaped with backslash (\), will be changed into newline charac-
      ters,  and  all  data  after the first % will be sent to the command as
      standard input.

Attachment: pgp458fPWq2Tg.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux