For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > February 2006 > Re: [PHP-DB] Future Event









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Future Event
JupiterHost.Net

2006-02-20, 6:56 pm



Mark Bomgardner wrote:

> Is there a way in php to execute a SELECT statement in the future? What


only if its running in the future :)

You can trigger it when a visitor visits your page but what are the
chances someone will visit it at 2:000 AM exactly every night?

You can run it as a daemon, which woudl be kind of stupid, plus if they
don;t let you run cron they probably don;t want a script to run 24/7
just to send an email at 2:00 AM

You can cron it.

You can cron a script on a different server to run your script on the
non-cron machine via SSH, HTTP, etc...

BTW, this applies to scripting of any kind, Actually there are soem Perl
modules that can do this, have you looked on CPAN?

> I am wanting to do is use a page to parse a database at a future time.
> I want to send out some email about an event I am putting on, but I
> don't want to execute the select statement until 2:00am. I could use
> cron for this, but I would perfer not, as I am writing an application in
> which cron may not be an option. Is there 3rd party engines that will
> do this?


Yes, Cron is one that 99% of servers will have and several Perl Modules
on CPAN.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com