Cron Problems

Christian Campbell ccampbell at brueggers.com
Fri Jun 27 15:20:45 UTC 2008


I’m running a php script from a cronjob and receive the following output
when it runs:

/bin/sh: -c: line 0: syntax error near unexpected token `newline' 
/bin/sh: -c: line 0: `php /var/www/html/cacti/poller.php > /dev/null 2>&'

I've tried running it as root, and as a non-privileged user.  When I run it
directly from the command-line, it runs without issue.  I've run it by using
'crontab -e' or directly editing /etc/crontab and restarting crond.

My cron entry is:  */5 * * * * root php /var/www/html/cacti/poller.php >
/dev/null 2>& 

and I've also tried:  */5 * * * * php /var/www/html/cacti/poller.php >
/dev/null 2>&

Any ideas?

Thanks,
Christian



Christian Campbell
Systems Engineer
 
Bruegger's Enterprises Inc.
Desk: 802-652-9270
Cell: 802-734-5023
Fax: 802-660-4034 
Email: ccampbell at brueggers dot com
 
PGP Public Key available via PGP keyservers or
http://www2.brueggers.com/pgp/ccampbell.html
 
"Computer Science is no more about computers 
than astronomy is about telescopes."
--E. Dijkstra

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3090 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/redhat-sysadmin-list/attachments/20080627/616f1455/attachment.bin>


More information about the redhat-sysadmin-list mailing list