[PHP] Schedule an Event with PHP

2004-01-16 Thread Alex Pilson
Say I want a MySQL database to have a table that holds certain 
events, the Event table. And in the event table, one of the records 
is an event that has a startdate of today, I want to check against 
that date, if it equals now, then do this

Besides using CRON to hit that particular event table, is there any 
other method I am not thinking of that can be used with PHP? I want 
to check that event table every 5 minutes.

Thanks!
--
---
Alex Pilson
FlagShip Interactive, Inc.
[EMAIL PROTECTED]
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Stuart
Alex Pilson wrote:
Say I want a MySQL database to have a table that holds certain events, 
the Event table. And in the event table, one of the records is an event 
that has a startdate of today, I want to check against that date, if it 
equals now, then do this

Besides using CRON to hit that particular event table, is there any 
other method I am not thinking of that can be used with PHP? I want to 
check that event table every 5 minutes.
Please don't reply to a message to start a new topic - it really screws 
up the threading built into decent mail clients.

There are other methods like running a PHP script as a daemon and 
getting web requests to check each time but neither of those are 
anywhere near as reliable or efficient as cron. Why don't you want to 
use cron?

--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread John W. Holmes
Alex Pilson wrote:
Say I want a MySQL database to have a table that holds certain events, 
the Event table. And in the event table, one of the records is an event 
that has a startdate of today, I want to check against that date, if it 
equals now, then do this

Besides using CRON to hit that particular event table, is there any 
other method I am not thinking of that can be used with PHP? I want to 
check that event table every 5 minutes.
I guess you could write a PHP script that'll run continuously and check 
the database every 5 minutes, but you'd be better off (and probably use 
less resources) if you just used Cron/Task Scheduler.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Richard Davey
Hello Alex,

Friday, January 16, 2004, 2:36:45 PM, you wrote:

AP Besides using CRON to hit that particular event table, is there any
AP other method I am not thinking of that can be used with PHP? I want
AP to check that event table every 5 minutes.

Use cron. There are several other ways, but none as reliable.

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Alex Pilson
At 9:44 AM -0500 1/16/04, John W. Holmes wrote:
Alex Pilson wrote:
Say I want a MySQL database to have a table that holds certain 
events, the Event table. And in the event table, one of the records 
is an event that has a startdate of today, I want to check against 
that date, if it equals now, then do this

Besides using CRON to hit that particular event table, is there any 
other method I am not thinking of that can be used with PHP? I want 
to check that event table every 5 minutes.
I guess you could write a PHP script that'll run continuously and 
check the database every 5 minutes, but you'd be better off (and 
probably use less resources) if you just used Cron/Task Scheduler.


Awesome feedback guys. And quick too. No I am not opposed to using 
cron, just was curious if there was anything else to use. With 
regards to ISPs that host PHP clients, what is the common practice to 
allow users to run cron scripts?

BTW. I didn't get what Stuart said about replying to an existing 
thread, did something screw up when I sent to the list?

Thanks for the help.
--
---
Alex Pilson
FlagShip Interactive, Inc.
[EMAIL PROTECTED]
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Jason Wong
On Friday 16 January 2004 23:25, Alex Pilson wrote:

 BTW. I didn't get what Stuart said about replying to an existing
 thread, did something screw up when I sent to the list?

He means:

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Stock's Observation:
You no sooner get your head above water but what someone pulls
your flippers off.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php