Re: Corn job anomaly

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

 



> On Sep 20, 2016, at 10:09 PM, Peter Beckman <beckman@xxxxxxxxxxx> wrote:
> 
> I suspect you are taking the pipe or semicolon literally.
> 
> Drop the pipe and semicolon entirely. This should work:
> 
>    /usr/bin/php5 -c /home/123456/etc/php.ini -f /home/123456/data/auto_reminder.php
> 
> 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.
> 
> 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.
> 
> 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.
> 
> So -- lose the pipe, lose the semicolon, just run the command above in cron
> (and on the command line) and it should "just work."
> 
> Beckman
> 
> 


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
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux