[PHP] php as cron

2001-12-10 Thread Jay Paulson

I'm trying to test php running as a cron job and I have installed php as a CGI in 
/usr/local/bin and I have edited my crontab file to call a php file every two minutes. 
 However, it's not working and I was wondering if you all would know what's going on.  
Anyway, here's how I have things set up.

crontab file:
*/2 * * * * php /home/crontest.php  /dev/null

crontest.php:
#!/usr/local/bin/php -q
?php
mail([EMAIL PROTECTED],cron test, testing,NULL);
?

email I'm receiving with error:
Subject: Cron  php /home/crontest.php  /dev/null
Body: /bin/sh: php: command not found

thanks for any help.



Re: [PHP] php as cron

2001-12-10 Thread Shane Wright

Hi

You probably need to set the path to your PHP binary in crontab.

Alternatively (this is probs a better way), wrap the whole lot up in a simple 
shell script and get cron to run the shell script.

It's easier than it sounds...

#!/bin/bash
cd /path/to/php/scripts
php  myscript.php  /dev/null

(also, I tend not to have PHP direct output to /dev/null, but to configure 
cron not to send emails on completion - that way you get the info when you 
run the script on the command line but dont get overrun with pointless emails)

Hope that helps :)

--
Shane

On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
 I'm trying to test php running as a cron job and I have installed php as a
 CGI in /usr/local/bin and I have edited my crontab file to call a php file
 every two minutes.  However, it's not working and I was wondering if you
 all would know what's going on.  Anyway, here's how I have things set up.

 crontab file:
 */2 * * * * php /home/crontest.php  /dev/null

 crontest.php:
 #!/usr/local/bin/php -q
 ?php
 mail([EMAIL PROTECTED],cron test, testing,NULL);
 ?

 email I'm receiving with error:
 Subject: Cron  php /home/crontest.php  /dev/null
 Body: /bin/sh: php: command not found

 thanks for any help.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-12-10 Thread Darren Gamble

Good day,

Doesn't having the statement #!/usr/local/bin/php -q at the start of the
program makes running php (rather than the script itself) redundant?  Why
not just call the script in the crontab?


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Shane Wright [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 11:47 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php as cron


Hi

You probably need to set the path to your PHP binary in crontab.

Alternatively (this is probs a better way), wrap the whole lot up in a
simple 
shell script and get cron to run the shell script.

It's easier than it sounds...

#!/bin/bash
cd /path/to/php/scripts
php  myscript.php  /dev/null

(also, I tend not to have PHP direct output to /dev/null, but to configure 
cron not to send emails on completion - that way you get the info when you 
run the script on the command line but dont get overrun with pointless
emails)

Hope that helps :)

--
Shane

On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
 I'm trying to test php running as a cron job and I have installed php as a
 CGI in /usr/local/bin and I have edited my crontab file to call a php file
 every two minutes.  However, it's not working and I was wondering if you
 all would know what's going on.  Anyway, here's how I have things set up.

 crontab file:
 */2 * * * * php /home/crontest.php  /dev/null

 crontest.php:
 #!/usr/local/bin/php -q
 ?php
 mail([EMAIL PROTECTED],cron test, testing,NULL);
 ?

 email I'm receiving with error:
 Subject: Cron  php /home/crontest.php  /dev/null
 Body: /bin/sh: php: command not found

 thanks for any help.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-12-10 Thread jr


Why not just use lynx to run it?

*/2 * * * * /usr/local/bin/lynx -dump crontest.php 

JR

 
 On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
  I'm trying to test php running as a cron job and I have installed php as a
  CGI in /usr/local/bin and I have edited my crontab file to call a php file
  every two minutes.  However, it's not working and I was wondering if you
  all would know what's going on.  Anyway, here's how I have things set up.
 
  crontab file:
  */2 * * * * php /home/crontest.php  /dev/null
 
  crontest.php:
  #!/usr/local/bin/php -q
  ?php
  mail([EMAIL PROTECTED],cron test, testing,NULL);
  ?
 
  email I'm receiving with error:
  Subject: Cron  php /home/crontest.php  /dev/null
  Body: /bin/sh: php: command not found
 
  thanks for any help.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php as cron

2001-12-10 Thread Jay Paulson

I was wondering how to disable the auto email after the cron job is done.
How exactly do you disable it?

thanks for the help btw!

- Original Message -
From: Shane Wright [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 12:47 PM
Subject: Re: [PHP] php as cron


 Hi

 You probably need to set the path to your PHP binary in crontab.

 Alternatively (this is probs a better way), wrap the whole lot up in a
simple
 shell script and get cron to run the shell script.

 It's easier than it sounds...

 #!/bin/bash
 cd /path/to/php/scripts
 php  myscript.php  /dev/null

 (also, I tend not to have PHP direct output to /dev/null, but to configure
 cron not to send emails on completion - that way you get the info when you
 run the script on the command line but dont get overrun with pointless
emails)

 Hope that helps :)

 --
 Shane

 On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
  I'm trying to test php running as a cron job and I have installed php as
a
  CGI in /usr/local/bin and I have edited my crontab file to call a php
file
  every two minutes.  However, it's not working and I was wondering if you
  all would know what's going on.  Anyway, here's how I have things set
up.
 
  crontab file:
  */2 * * * * php /home/crontest.php  /dev/null
 
  crontest.php:
  #!/usr/local/bin/php -q
  ?php
  mail([EMAIL PROTECTED],cron test, testing,NULL);
  ?
 
  email I'm receiving with error:
  Subject: Cron  php /home/crontest.php  /dev/null
  Body: /bin/sh: php: command not found
 
  thanks for any help.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php as cron

2001-12-10 Thread Jay Paulson

I don't want to use lynx to run the script because I don't want this script
accessible through a web browser :)

- Original Message -
From: [EMAIL PROTECTED]
To: Darren Gamble [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 1:12 PM
Subject: RE: [PHP] php as cron



 Why not just use lynx to run it?

 */2 * * * * /usr/local/bin/lynx -dump crontest.php

 JR


  On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
   I'm trying to test php running as a cron job and I have installed php
as a
   CGI in /usr/local/bin and I have edited my crontab file to call a php
file
   every two minutes.  However, it's not working and I was wondering if
you
   all would know what's going on.  Anyway, here's how I have things set
up.
  
   crontab file:
   */2 * * * * php /home/crontest.php  /dev/null
  
   crontest.php:
   #!/usr/local/bin/php -q
   ?php
   mail([EMAIL PROTECTED],cron test, testing,NULL);
   ?
  
   email I'm receiving with error:
   Subject: Cron  php /home/crontest.php  /dev/null
   Body: /bin/sh: php: command not found
  
   thanks for any help.
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-12-10 Thread Darren Gamble

Good day,

Calling another program with this script is unnecessary, since you are using
the shebang operator.

Instead of:

*/2 * * * * php /home/crontest.php  /dev/null

Use:

*/2 * * * * /home/crontest.php  /dev/null

Which should work just fine.

As pointed out, the reason you were getting the message was because cron is
not able to find php because /usr/local/bin is not in the path.  If you
really want to use it, then the following:

*/2 * * * * /usr/local/bin/php /home/crontest.php  /dev/null

would also work.  You could remove the #! line in your script if you do so.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 12:12 PM
To: Darren Gamble
Cc: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] php as cron



Why not just use lynx to run it?

*/2 * * * * /usr/local/bin/lynx -dump crontest.php 

JR

 
 On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
  I'm trying to test php running as a cron job and I have installed php as
a
  CGI in /usr/local/bin and I have edited my crontab file to call a php
file
  every two minutes.  However, it's not working and I was wondering if you
  all would know what's going on.  Anyway, here's how I have things set
up.
 
  crontab file:
  */2 * * * * php /home/crontest.php  /dev/null
 
  crontest.php:
  #!/usr/local/bin/php -q
  ?php
  mail([EMAIL PROTECTED],cron test, testing,NULL);
  ?
 
  email I'm receiving with error:
  Subject: Cron  php /home/crontest.php  /dev/null
  Body: /bin/sh: php: command not found
 
  thanks for any help.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-12-10 Thread Martin Towell

to stop errors from being email to you, redirect stderr to /dev/null:
*/2 * * * * /home/crontest.php  /dev/null 2 /dev/null

-Original Message-
From: Jay Paulson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 11, 2001 6:19 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] php as cron


I was wondering how to disable the auto email after the cron job is done.
How exactly do you disable it?

thanks for the help btw!

- Original Message -
From: Shane Wright [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 12:47 PM
Subject: Re: [PHP] php as cron


 Hi

 You probably need to set the path to your PHP binary in crontab.

 Alternatively (this is probs a better way), wrap the whole lot up in a
simple
 shell script and get cron to run the shell script.

 It's easier than it sounds...

 #!/bin/bash
 cd /path/to/php/scripts
 php  myscript.php  /dev/null

 (also, I tend not to have PHP direct output to /dev/null, but to configure
 cron not to send emails on completion - that way you get the info when you
 run the script on the command line but dont get overrun with pointless
emails)

 Hope that helps :)

 --
 Shane

 On Monday 10 Dec 2001 5:54 pm, Jay Paulson wrote:
  I'm trying to test php running as a cron job and I have installed php as
a
  CGI in /usr/local/bin and I have edited my crontab file to call a php
file
  every two minutes.  However, it's not working and I was wondering if you
  all would know what's going on.  Anyway, here's how I have things set
up.
 
  crontab file:
  */2 * * * * php /home/crontest.php  /dev/null
 
  crontest.php:
  #!/usr/local/bin/php -q
  ?php
  mail([EMAIL PROTECTED],cron test, testing,NULL);
  ?
 
  email I'm receiving with error:
  Subject: Cron  php /home/crontest.php  /dev/null
  Body: /bin/sh: php: command not found
 
  thanks for any help.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



RE: [PHP] php as cron

2001-06-22 Thread AJDIN BRANDIC

Hi again,

this is what I have done, as adviced by you guys (thanks)

created a file called pop which contains
#! /bin/sh
lynx -dump http://192.168.254.10/pop3/pop3_stuff2.php3  /dev/null
clear

If I execute this from the shell ./pop it works OK.
But as a cron job I get an error message sent to my mail box
Your terminal lacks the ability to clear the screen or position the 
cursor.,
hence this 'clear' bit in my script to try to sort the problem but no joy.

Any ideas?

Ajdin



On Thu, 21 Jun 2001, Joseph Tate wrote:

 Have you tried 'php FILENAME'?  Now, I don't know how you would pass
 parameters to it...
 
  -Original Message-
  From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, June 21, 2001 8:09 AM
  To: AJDIN BRANDIC
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] php as cron
 
 
  try etc.
 
  00,30 * * * * lynx -dump http://path.to.php.script  /dev/null
 
  Regards
 
  Johan
 
  
   Hi
  
   I have PHP installed as Apache module but I want to run a cron job.  I
   have .php script that works OK when executed through browser
  but is there
   any way I could execute it through a cron job.
  
   Ajdin
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] php as cron

2001-06-22 Thread Gianluca Baldo


AB If I execute this from the shell ./pop it works OK.
AB But as a cron job I get an error message sent to my mail box
AB Your terminal lacks the ability to clear the screen or position the 
AB cursor.,
AB hence this 'clear' bit in my script to try to sort the problem but no joy.
I have had the same problem in some debian installations.
As far as I investigaed, it possibly has to deal with the TERM
parameter but finally I did solve the problem installing also a
copiled version of PHP an calling it like:

* * * * * php /var/www/path/to/script.php

Cheers,
   Gianluca
   
AB Any ideas?

AB Ajdin



AB On Thu, 21 Jun 2001, Joseph Tate wrote:

 Have you tried 'php FILENAME'?  Now, I don't know how you would pass
 parameters to it...
 
  -Original Message-
  From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, June 21, 2001 8:09 AM
  To: AJDIN BRANDIC
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] php as cron
 
 
  try etc.
 
  00,30 * * * * lynx -dump http://path.to.php.script  /dev/null
 
  Regards
 
  Johan
 
  
   Hi
  
   I have PHP installed as Apache module but I want to run a cron job.  I
   have .php script that works OK when executed through browser
  but is there
   any way I could execute it through a cron job.
  
   Ajdin
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 



[EMAIL PROTECTED]

BcnInédita
EURO RSCG INTERACTION
www.bcninedita.com
Planella, 39
08017 Barcelona
Tel.34 932 531 950 (directo 93 253 19 53)
Fax. 34 932 114 546 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[2]: [PHP] php as cron

2001-06-22 Thread lenar

 I have had the same problem in some debian installations.
 As far as I investigaed, it possibly has to deal with the TERM
 parameter but finally I did solve the problem installing also a
 copiled version of PHP an calling it like:
 
 * * * * * php /var/www/path/to/script.php

This might be more useful:
* * * * * php -q /var/www/path/to/script.php

It surpresses those HTML headers that you propably don't want in shell mode.

lenar.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-06-22 Thread Jean-Arthur Silve

Why don't you put directly this line in your cron file ?

i.e :

00 03 * * * lynx -dump http://192.168.254.10/pop3/pop3_stuff2.php3

for daily 3.00 AM

jean-arthur



At 09:28 22/06/01 +0100, AJDIN BRANDIC wrote:
Hi again,

this is what I have done, as adviced by you guys (thanks)

created a file called pop which contains
#! /bin/sh
lynx -dump http://192.168.254.10/pop3/pop3_stuff2.php3  /dev/null
clear

If I execute this from the shell ./pop it works OK.
But as a cron job I get an error message sent to my mail box
Your terminal lacks the ability to clear the screen or position the
cursor.,
hence this 'clear' bit in my script to try to sort the problem but no joy.

Any ideas?

Ajdin



On Thu, 21 Jun 2001, Joseph Tate wrote:

  Have you tried 'php FILENAME'?  Now, I don't know how you would pass
  parameters to it...
 
   -Original Message-
   From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, June 21, 2001 8:09 AM
   To: AJDIN BRANDIC
   Cc: [EMAIL PROTECTED]
   Subject: RE: [PHP] php as cron
  
  
   try etc.
  
   00,30 * * * * lynx -dump http://path.to.php.script  /dev/null
  
   Regards
  
   Johan
  
   
Hi
   
I have PHP installed as Apache module but I want to run a cron job.  I
have .php script that works OK when executed through browser
   but is there
any way I could execute it through a cron job.
   
Ajdin
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
   
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


EuroVox
4, place Félix Eboue
75583 Paris Cedex 12
Tel : 01 44 67 05 05
Fax : 01 44 67 05 19
Web : http://www.eurovox.fr



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php as cron

2001-06-22 Thread infoz

If you're partial to the approach of using a web-based program to do this
(often a bad idea, for security reasons) then look at 'curl' or 'wget'
instead of 'lynx'. (you can find them on Freshmeat.net)

Much better is to build the CGI version of PHP, and use PHP as a script
processor just like Perl, Korn, BASH, etc., i.e.

#!/path/to/php.cgi -q
...script goes here...


- Tim
  http://www.phptemplates.org

- Original Message -
From: AJDIN BRANDIC [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 22, 2001 4:28 AM
Subject: RE: [PHP] php as cron


 Hi again,

 this is what I have done, as adviced by you guys (thanks)

 created a file called pop which contains
 #! /bin/sh
 lynx -dump http://192.168.254.10/pop3/pop3_stuff2.php3  /dev/null
 clear

 If I execute this from the shell ./pop it works OK.
 But as a cron job I get an error message sent to my mail box
 Your terminal lacks the ability to clear the screen or position the
 cursor.,
 hence this 'clear' bit in my script to try to sort the problem but no joy.

 Any ideas?

 Ajdin



 On Thu, 21 Jun 2001, Joseph Tate wrote:

  Have you tried 'php FILENAME'?  Now, I don't know how you would pass
  parameters to it...
 
   -Original Message-
   From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, June 21, 2001 8:09 AM
   To: AJDIN BRANDIC
   Cc: [EMAIL PROTECTED]
   Subject: RE: [PHP] php as cron
  
  
   try etc.
  
   00,30 * * * * lynx -dump http://path.to.php.script  /dev/null
  
   Regards
  
   Johan
  
   
Hi
   
I have PHP installed as Apache module but I want to run a cron job.
I
have .php script that works OK when executed through browser
   but is there
any way I could execute it through a cron job.
   
Ajdin
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
[EMAIL PROTECTED]
   
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php as cron

2001-06-21 Thread AJDIN BRANDIC

Hi

I have PHP installed as Apache module but I want to run a cron job.  I 
have .php script that works OK when executed through browser but is there 
any way I could execute it through a cron job.

Ajdin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-06-21 Thread Johan Holst Nielsen

try etc.

00,30 * * * * lynx -dump http://path.to.php.script  /dev/null

Regards

Johan


 Hi

 I have PHP installed as Apache module but I want to run a cron job.  I
 have .php script that works OK when executed through browser but is there
 any way I could execute it through a cron job.

 Ajdin


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-06-21 Thread Galvin, Max

Either recompile PHP as a cgi OR use lynx to do it so:

lynx -dump http://www.mysite.com/myscript.php

You can then collect the output in the usual ways.

M 

 --
 From: AJDIN BRANDIC[SMTP:[EMAIL PROTECTED]]
 Sent: 21 June 2001 09:07
 To:   [EMAIL PROTECTED]
 Subject:  [PHP] php as cron
 
 Hi
 
 I have PHP installed as Apache module but I want to run a cron job.  I 
 have .php script that works OK when executed through browser but is there 
 any way I could execute it through a cron job.
 
 Ajdin
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-06-21 Thread Joseph Tate

Have you tried 'php FILENAME'?  Now, I don't know how you would pass
parameters to it...

 -Original Message-
 From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 21, 2001 8:09 AM
 To: AJDIN BRANDIC
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] php as cron


 try etc.

 00,30 * * * * lynx -dump http://path.to.php.script  /dev/null

 Regards

 Johan

 
  Hi
 
  I have PHP installed as Apache module but I want to run a cron job.  I
  have .php script that works OK when executed through browser
 but is there
  any way I could execute it through a cron job.
 
  Ajdin
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php as cron

2001-06-21 Thread lenar

You have global variables $argc (count of arguments) and $argv (array
containing arguments given on command line)

lenar.

Joseph Tate [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Have you tried 'php FILENAME'?  Now, I don't know how you would pass
 parameters to it...

  -Original Message-
  From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, June 21, 2001 8:09 AM
  To: AJDIN BRANDIC
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] php as cron
 
 
  try etc.
 
  00,30 * * * * lynx -dump http://path.to.php.script  /dev/null
 
  Regards
 
  Johan
 
  
   Hi
  
   I have PHP installed as Apache module but I want to run a cron job.  I
   have .php script that works OK when executed through browser
  but is there
   any way I could execute it through a cron job.
  
   Ajdin
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] php as cron

2001-06-21 Thread AJDIN BRANDIC

Thanks all

Ajdin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]