Hi,
There are 2 types of values in Expire Type enum:
1. TriggerClass.ExpireT.DateTime
2. TriggerClass.ExpireT.Times
I am able to use first option properly. However, the second option doesn't seem to be working.
I have tried the following code:
TriggerClass tgc = new TriggerClass();
tgc.Active = true;
tgc.JobId = m_JC.Id;
tgc.TriggerType = TriggerClass.TriggerT.TimeType;
tgc.TTime = new TimeClass();
tgc.TTime.TimeTriggerType = TimeClass.TimeTriggerT.Interval;
tgc.TTime.IntervalType = TimeClass.IntervalT.Secondly;
tgc.TTime.IntervalValue = 5;
tgc.ExpireType = TriggerClass.ExpireT.Times;
tgc.TimesUntilExpire = 4;
tgc.ExpireActionType = TriggerClass.ExpireActionT.Delete;
tgc.ExpirationEnabled = true;
m_JC.Triggers = new List<TriggerClass>();
m_JC.Triggers.Add(tgc);
m_JC is my job object.