create new task only if it diffrent from older

This forum is designated to discuss SiComponents Scheduling Agent.
Post Reply
Posts: 1
Joined: Tue Aug 16, 2011 9:03 am

create new task only if it diffrent from older

Post by ronitv »

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 :(

Site Admin
Posts: 2265
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »


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.
Best regards,
Igor Sitikov.

Post Reply