Minor change, I think it should be a datetime field not a timestamp field 
since timestamps are supposed to be updated by the database.

On Fri, 26 Apr 2002 [EMAIL PROTECTED] wrote:

> Date: Fri, 26 Apr 2002 17:16:06 +0100
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Scheduling with MySQL
> 
> 
> I do not think MySQL has any scheduling abilities, clever or
> otherwise. MySQL just obeys orders. Scheduling (correctly, in
> my opinion) is the province of cron and suchlike.
> 
> However, I would suggest, if you have control of the search
> tools, that you simply put in an extra timestamp field called
> "hideuntil" into your database, and add conditions into your
> searches that drop rows for which hideuntil is not null and is
> after the current time.
> 
> This has the advantage that you don't waste cycles on cron jobs,
> the hidden entries become visible at the exact moment the
> user specified instead of the next time the cron job runs,
> that you can (if you want to) do searches which include hidden
> messages, that you are using MySQL to do what it is best at,
> that your system doesn't have bits of intelligence hanging
> round in cron jobs...
> 
> Alec Cawley
> 
> 
> 
> ----------------------------------------------------------------
> You said:
> 
> I have a PHP based web interface that interacts with MySQL to let users
> insert data into a table called "Messages". Once an entry is made in this
> table, other applications read and process the entries, modifying them
> where
> appropriate.
> 
> I would like to add the capability to have this insertion scheduled, so
> that
> a user could fill in the details and choose not to insert the data until a
> particular date and time.
> 
> My current thought on how to implement this is to have a second table
> called
> "PendingMessages" that has the same structure as messages, but with one
> extra field (scheduleTimestamp) and then have a basic perl script that is
> run as a cronjob every five minutes that looks for entries that are past
> their scheduling date and moves them from PendingMessages to Messages.
> 
> Is this a good way of going about it, or does MySQL have any clever
> scheduling abilities itself?
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to