Re: [PHP-DB] Corn job anomaly
[email protected] (Karl DeSaulniers) Tue, 20 Sep 2016 22:21:21 -0500
| Newsgroups | php.db |
|---|---|
| Message-ID | <[email protected]> |
> On Sep 20, 2016, at 10:09 PM, Peter Beckman <[email protected]> = wrote: >=20 > I suspect you are taking the pipe or semicolon literally. >=20 > Drop the pipe and semicolon entirely. This should work: >=20 > /usr/bin/php5 -c /home/123456/etc/php.ini -f = /home/123456/data/auto_reminder.php >=20 > The "pipe" (|) in unix (and I assume this is unix) means to pipe the = output > of php5 -c config to the command "-f /home...php". Which (-f) isn't a = command. >=20 > The "semicolon" (;) in unix means "do this command first; then do this = command" > so in your second part it is running = /home/123456/data/auto_reminder.php -udb123456 after it runs php5. >=20 > Usually php5 -c php.ini will run PHP in interactive mode, and sits and > waits for input. When run from cron, there is no input, so it dies, = unable > to pipe the output (there is none) or just run the next command. >=20 > So -- lose the pipe, lose the semicolon, just run the command above in = cron > (and on the command line) and it should "just work." >=20 > Beckman >=20 >=20 Hey thanks Peter for clearing that up. Yes, I was taking the pipe and = semicolon literally. I have since found this out on my own that my original code works. It is = as Richard and Bert had said. My cron runs under the server admin user and so I have to contact my = client to find out what that password is or change it. Much thanks to everyone for your time and responses with my issue. You = guys are invaluable! Best, Karl DeSaulniers Design Drumm http://designdrumm.com=