Page 1 of 1

create new task only if it diffrent from older

Posted: Tue Aug 16, 2011 9:45 am
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 :(

Posted: Tue Aug 16, 2011 3:37 pm
by isiticov
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.