SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

create new task only if it diffrent from older

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent
View previous topic :: View next topic  
Author Message
ronitv



Joined: 16 Aug 2011
Posts: 1

PostPosted: Tue Aug 16, 2011 9:45 am    Post subject: create new task only if it diffrent from older Reply with quote

i'm a new user
my app shuold creat a task at the opening of the app
its read the task datails from file (type,interval,time) i want to rewrite
the task only if its details changes ( it will have the same name )
, i didnt fully understood how do you get the whice month and which day proprty ( it could be multiply?)

a adiffrent approch to the problom:
if i'll give the task name's unique name+ fixed part
like "Task_ddMMyyy" then if no exect name exist
i could delete all "Task_*" before creating new
For that I need to figure out hoe to get Task List search and delete the matched one's

HELP Please Sad
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Tue Aug 16, 2011 3:37 pm    Post subject: Reply with quote

Hello,

TTaskScheduler property Items[Index]:TTaskItem gives you acces to all task properties like NextRunTime, BeginDate, EndDate and others. You can inspect these properties for needs.

You can iterate through all Items property (which contains a list of scheduled tasks) and compare the name of every item with your mask.

The sample code for most of the properties and methods also could be found in Demo project under Demo sub-folder.

Hope this helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group