Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pulling Records In A Scheduler
Message
De
07/04/2008 21:11:41
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01308890
Message ID:
01308894
Vues:
8
Kevin, I'm assuming that tasks are removed from the table as they're performed and that you may need to "catch up" a few tasks if processing takes longer than a minute. That's why you used the <= att_min, right? If so then you may lose tasks if processing crosses the hour boundary- e.g. starts at 10:58h and the sql is not run again until 11:00h meaning you've missed any task at 10:59h. you could check for that by

SELECT att_pk;
FROM AutoTask;
WHERE HOUR(DATETIME()) < att_hour or ;
(HOUR(DATETIME()) = att_hour AND;
MINUTE(DATETIME()) <= att_min)

though you may still miss tasks if processing crosses the day barrier- e.g. runs at 23:58h and not again until 00:00 the next day.

Also, if it's possible you might have tasks from several minutes at once, you might add an ORDER BY to ensure that tasks are done in their intended order.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform