[PHP-DB] Re: [mysql-support] RE: [PHP-DB] Run php page automatically

2001-12-27 Thread Jeremy Reed

You can set up the task manager to run a php script from the command line:

php -q script.php  log.txt

The '-q' switch suppresses the HTTP header output, so if you scheduled the
script to run with the output redirected to a file, then all echoes etc. in
the script would be redirected to the log and you won't have to mess with
the web header stuff.  Oh, and make sure that the PHP subdirectory is
included in the PATH.  You can set this manually for testing by:

path=%path%;C:\PHP

Best regards,

Jeremy Reed


George Loch [EMAIL PROTECTED] wrote in message
001101c189a9$8eaa7a60$[EMAIL PROTECTED]">news:001101c189a9$8eaa7a60$[EMAIL PROTECTED]...
 What if you are on win2K?

 - Original Message -
 From: Jonathan Hilgeman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
 Sent: Thursday, December 20, 2001 12:22 PM
 Subject: [mysql-support] RE: [PHP-DB] Run php page automatically


  I usually just create a cron job for this. Create your PHP script that
 will
  delete the matching records once. Then go into cron and have it run
every
 10
  minutes.
 
  - Jonathan
 
  -Original Message-
  From: Harpreet [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, December 20, 2001 11:21 AM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: [PHP-DB] Run php page automatically
 
 
  I would like to create a php page that would automatically run every 10
  minutes or so to delete records from a table. This table has an
expiration
  field and records r tested by comparing current date with the expiration
  date and record is deleted if expired.
 
  Is this possible.
 
  Help is greatly appreciated.
 
  I am using php for my application. I am working on a LInux server and
 using
  mysql as my database.
 
  regards,
  Harpreet Kaur
  Software Developer
  Crispin Corporations Inc.
 
 
 
 
  --
  PHP Database 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]
  ___
 
  To unsubscribe yourself from this list please go to
 http://www.mysql.org/mailman/listinfo/support and read the unsubscription
 information.
 
 
   support mailing list
  [EMAIL PROTECTED]
  http://www.mysql.org/mailman/listinfo/support
 





-- 
PHP Database 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-DB] Run php page automatically

2001-12-21 Thread Jon Farmer

 it's better to do something like
 
 0,10,20,30,40,50 * * * * /usr/bin/php -q
 /home/you/yourscript.php  /dev/null

or even

*/10 * * * * /home/you/yourscript.php  /dev/null


with the first line of you php script being

#!/path/to/php -q





-- 
PHP Database 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-DB] Run php page automatically

2001-12-20 Thread Jonathan Hilgeman

I usually just create a cron job for this. Create your PHP script that will
delete the matching records once. Then go into cron and have it run every 10
minutes.

- Jonathan

-Original Message-
From: Harpreet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 11:21 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Run php page automatically


I would like to create a php page that would automatically run every 10
minutes or so to delete records from a table. This table has an expiration
field and records r tested by comparing current date with the expiration
date and record is deleted if expired.

Is this possible.

Help is greatly appreciated.

I am using php for my application. I am working on a LInux server and using
mysql as my database.

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.




-- 
PHP Database 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 Database 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-DB] Run php page automatically

2001-12-20 Thread Marco Eyzaguirre

do this (crontab file)

35 23 * * * root lynx http://www.host.com/dir/file.php -accept_all_cookies

it's work!
marco

-Mensaje original-
De: Harpreet [mailto:[EMAIL PROTECTED]]
Enviado el: Jueves, 20 de Diciembre de 2001 02:21 p.m.
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Asunto: [PHP-DB] Run php page automatically


I would like to create a php page that would automatically run every 10
minutes or so to delete records from a table. This table has an expiration
field and records r tested by comparing current date with the expiration
date and record is deleted if expired.

Is this possible.

Help is greatly appreciated.

I am using php for my application. I am working on a LInux server and using
mysql as my database.

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.




-- 
PHP Database 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 Database 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-DB] RE: [mysql-support] RE: [PHP-DB] Run php page automatically

2001-12-20 Thread Jonathan Hilgeman

In my opinion, PHP works fine with small scripts like this. True, it could
be more efficient with Perl, but when you don't know Perl, or don't have DB
perl modules installed, PHP scriptlets are a nice way to take care of small
tasks. And PHP can just as easily run a system command and append text to a
log file:

system('echo A new message  MyLogFile');

I used to think that PHP was only for the purpose of viewing through web
pages, but I've since found that it really can make a handy system tool
sometimes when Perl is a hassle.

- Jonathan

-Original Message-
From: NiteHaqr [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 1:53 PM
To: Jonathan Hilgeman; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [mysql-support] RE: [PHP-DB] Run php page automatically


I would probably recommend AGAINST running this php script from cron.

I have a similar script but I use a PERL version for auto-updates.

PHP should only (IMHO) be used where someone will see some output on a
webpage.

Other advantage of using PERL is that you could easily create a log file by
redirecting the output (or PRINT statements) to a file using simple
redirection ( and ) instead of having to actually manipulate the file.

Just my tuppenceworth.

David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
Of Jonathan Hilgeman
Sent: 20 December 2001 19:22
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [mysql-support] RE: [PHP-DB] Run php page automatically


I usually just create a cron job for this. Create your PHP script that will
delete the matching records once. Then go into cron and have it run every 10
minutes.

- Jonathan

-Original Message-
From: Harpreet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 20, 2001 11:21 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Run php page automatically


I would like to create a php page that would automatically run every 10
minutes or so to delete records from a table. This table has an expiration
field and records r tested by comparing current date with the expiration
date and record is deleted if expired.

Is this possible.

Help is greatly appreciated.

I am using php for my application. I am working on a LInux server and using
mysql as my database.

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.




--
PHP Database 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]
___

To unsubscribe yourself from this list please go to
http://www.mysql.org/mailman/listinfo/support and read the unsubscription
information.


 support mailing list
[EMAIL PROTECTED]
http://www.mysql.org/mailman/listinfo/support

-- 
PHP Database 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-DB] Re: [mysql-support] RE: [PHP-DB] Run php page automatically

2001-12-20 Thread George Loch

What if you are on win2K?

- Original Message -
From: Jonathan Hilgeman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, December 20, 2001 12:22 PM
Subject: [mysql-support] RE: [PHP-DB] Run php page automatically


 I usually just create a cron job for this. Create your PHP script that
will
 delete the matching records once. Then go into cron and have it run every
10
 minutes.

 - Jonathan

 -Original Message-
 From: Harpreet [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 20, 2001 11:21 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP-DB] Run php page automatically


 I would like to create a php page that would automatically run every 10
 minutes or so to delete records from a table. This table has an expiration
 field and records r tested by comparing current date with the expiration
 date and record is deleted if expired.

 Is this possible.

 Help is greatly appreciated.

 I am using php for my application. I am working on a LInux server and
using
 mysql as my database.

 regards,
 Harpreet Kaur
 Software Developer
 Crispin Corporations Inc.




 --
 PHP Database 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]
 ___

 To unsubscribe yourself from this list please go to
http://www.mysql.org/mailman/listinfo/support and read the unsubscription
information.


  support mailing list
 [EMAIL PROTECTED]
 http://www.mysql.org/mailman/listinfo/support




-- 
PHP Database 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-DB] Re: [mysql-support] RE: [PHP-DB] Run php page automatically

2001-12-20 Thread Marco Eyzaguirre

task manager

-Mensaje original-
De: George Loch [mailto:[EMAIL PROTECTED]]
Enviado el: Jueves, 20 de Diciembre de 2001 05:56 PM
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Asunto: [PHP-DB] Re: [mysql-support] RE: [PHP-DB] Run php page
automatically


What if you are on win2K?

- Original Message -
From: Jonathan Hilgeman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, December 20, 2001 12:22 PM
Subject: [mysql-support] RE: [PHP-DB] Run php page automatically


 I usually just create a cron job for this. Create your PHP script that
will
 delete the matching records once. Then go into cron and have it run every
10
 minutes.

 - Jonathan

 -Original Message-
 From: Harpreet [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 20, 2001 11:21 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP-DB] Run php page automatically


 I would like to create a php page that would automatically run every 10
 minutes or so to delete records from a table. This table has an expiration
 field and records r tested by comparing current date with the expiration
 date and record is deleted if expired.

 Is this possible.

 Help is greatly appreciated.

 I am using php for my application. I am working on a LInux server and
using
 mysql as my database.

 regards,
 Harpreet Kaur
 Software Developer
 Crispin Corporations Inc.




 --
 PHP Database 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]
 ___

 To unsubscribe yourself from this list please go to
http://www.mysql.org/mailman/listinfo/support and read the unsubscription
information.


  support mailing list
 [EMAIL PROTECTED]
 http://www.mysql.org/mailman/listinfo/support




--
PHP Database 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 Database 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-DB] Run php page automatically

2001-12-20 Thread Beau Lebens

it's better to do something like

0,10,20,30,40,50*   *   *   *   /usr/bin/php -q
/home/you/yourscript.php  /dev/null

since crontab actually stores the result of it's operations in a file
(/home/you/Mailbox?) so you will bloat your server if you don't clear the
output.

alternatively, use yourscript.php   /home/you/logfile and send the output
to a text-based logfile for later analysis, then just make sure you aren't
using b and stuff in the log :)

HTH

/beau

// -Original Message-
// From: Marco Eyzaguirre [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 21 December 2001 3:28 AM
// To: [EMAIL PROTECTED]
// Subject: RE: [PHP-DB] Run php page automatically
// Importance: High
// 
// 
// do this (crontab file)
// 
// 35 23 * * * root lynx http://www.host.com/dir/file.php 
// -accept_all_cookies
// 
// it's work!
// marco
// 
// -Mensaje original-
// De: Harpreet [mailto:[EMAIL PROTECTED]]
// Enviado el: Jueves, 20 de Diciembre de 2001 02:21 p.m.
// Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
// Asunto: [PHP-DB] Run php page automatically
// 
// 
// I would like to create a php page that would automatically 
// run every 10
// minutes or so to delete records from a table. This table has 
// an expiration
// field and records r tested by comparing current date with 
// the expiration
// date and record is deleted if expired.
// 
// Is this possible.
// 
// Help is greatly appreciated.
// 
// I am using php for my application. I am working on a LInux 
// server and using
// mysql as my database.
// 
// regards,
// Harpreet Kaur
// Software Developer
// Crispin Corporations Inc.
// 
// 
// 
// 
// -- 
// PHP Database 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 Database 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 Database 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]