Schedule (TitTask)
De Wiki1000
(Différences entre les versions)
(Page créée avec « <source lang='delphi'>function Schedule(p:TdbmPlanification; var aReason:string):boolean;</source> Cette fonction planifie l'exécution de la tâche. {|class="wikitable"... ») |
|||
Ligne 22 : | Ligne 22 : | ||
<source lang="delphi"> | <source lang="delphi"> | ||
//Procedure ScheduleTask2; | //Procedure ScheduleTask2; | ||
− | var inst: | + | var inst:TPlanificationData; task:TTestTask; aReason:string; |
begin | begin | ||
− | inst := | + | inst := TPlanificationData.Create; |
inst.RepeatValue.Value := enumEventRepeat_Minutes; | inst.RepeatValue.Value := enumEventRepeat_Minutes; | ||
inst.RepeatInterval := 1; | inst.RepeatInterval := 1; | ||
Ligne 37 : | Ligne 37 : | ||
Voir aussi: | Voir aussi: | ||
− | * [[ | + | * [[TPlanificationData (class)|TPlanificationData]] |
− | * [[Post ( | + | * [[Post (TPlanificationData)|Post sur une planification]] |
{{Footer|Classe_tâche_(stereotype)}} | {{Footer|Classe_tâche_(stereotype)}} | ||
[[Category:Stéréotype tâche]] | [[Category:Stéréotype tâche]] |
Version actuelle en date du 24 mai 2019 à 15:11
function Schedule(p:TdbmPlanification; var aReason:string):boolean;
Cette fonction planifie l'exécution de la tâche.
Paramètre | Usage |
---|---|
p | Objet planification |
aReason | Information sur l'erreur |
Result | True si succès |
Exemple :
//Procedure ScheduleTask2; var inst:TPlanificationData; task:TTestTask; aReason:string; begin inst := TPlanificationData.Create; inst.RepeatValue.Value := enumEventRepeat_Minutes; inst.RepeatInterval := 1; // task := TTestTask.Create; if not task.Schedule(inst,aReason) then showMessage('schedule failed:'+aReason) else showMessage('schedule OK'); end;
Voir aussi:
Whos here now: Members 0 Guests 1 Bots & Crawlers 0 |