Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jan 2010 12:48:28 -0800
From:      Diego Montalvo <dmontalvo@gmail.com>
To:        mikel king <mikel.king@olivent.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Running PHP File under Crontab...
Message-ID:  <aefec1611001171248k38dd16c8xcc128fccb9c7d9d6@mail.gmail.com>
In-Reply-To: <6DDE69B1-E8FD-4889-ADA6-4F81BC30BC61@olivent.com>
References:  <aefec1611001171028rc1cb284o5ca57bd67eed6c3d@mail.gmail.com> <91E8AD4B-C321-41C7-BA0E-E89E4D5CE40F@olivent.com> <aefec1611001171130r4afbe666t3a77c1a367551a20@mail.gmail.com> <BDB4F5EC-1452-4616-9C7E-1E1DDF1B8400@olivent.com> <aefec1611001171201o241cfe5ep8618d8c06434e910@mail.gmail.com> <6DDE69B1-E8FD-4889-ADA6-4F81BC30BC61@olivent.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
One other question,  is there a way to copy the ouput of the crontab
"php" file to another file?

Simply the "hello world" output and not the <?php?> code... ??

2010/1/17 mikel king <mikel.king@olivent.com>:
>
> On Jan 17, 2010, at 3:01 PM, Diego Montalvo wrote:
>
>> I am using "<?php #!/bin/sh ?>
>>
>> 2010/1/17 mikel king <mikel.king@olivent.com>:
>>>
>>> On Jan 17, 2010, at 2:30 PM, Diego Montalvo wrote:
>>>
>>>> CLI meaning, if I can run and excute <?php echo 'hello world';?> in
>>>> command line, =A0a php file can run in crontab? =A0doing the following=
 in
>>>> shell: "# php helloworld.php" - "hello world" is produced...
>>>>
>>>> Thanks!
>>>>
>>>>
>>>
>>>
>>> ok then do you have #!/usr/local/bin/php as your first line of the
>>> script?
>>> Or are you using the bash exec command to run the code in your shell
>>> script?
>>>
>>> Also you can try placing the path to the php CLI executable in the
>>> crontab.
>
>
> If your php executable is in /usr/local/bin then replace /bin/sh with tha=
t
> in your script file.
>
> #!/usr/local/bin/php
>
> <?php
>
> =A0 =A0 =A0 =A0echo "Hello cruel world!!!\n";
>
> ?>
>
> Remember to chmod +x the script file.
>
> m!
>
>



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?aefec1611001171248k38dd16c8xcc128fccb9c7d9d6>