[lug] Shell/Cron and passing args

John Starkey jstarkey at advancecreations.com
Thu Jan 30 02:50:58 MST 2003


Hello all. I've got a PHP shell script that I'm running perfectly fine
in a normal shell, but I can't get it to run with cron.

Basically, it's a script that writes several includes for a web page.
Each are fairly common, so I've got one script and I'm trying to pass it
arguments, with different cron entries. I can pass the arguments fine in
a shell, but cron isn't happy.

This is the shell command:

/path/to/make_featured.php links

no problem. But if I do:

01 00 * * * /path/to/phpbin < /path/to/make_featured.php links >
/path/to/log/cron 2>&1 

it fails saying the argument 'links' isn't seen.

The only fix I can find is to create a bash wrapper for it. Does anyone
know what I'm doing wrong, before I create 2 scripts to do the work of
one?

Thanks much,

John

-- 
John Starkey <jstarkey at advancecreations.com>



More information about the LUG mailing list