View Issue Details

IDProjectCategoryView StatusLast Update
0001744JEDI VCL00 JVCL Componentspublic2004-08-03 07:24
ReporteranonymousAssigned Tomarcelb 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001744: JvScheduledEvents erratic
DescriptionIn using ScheduledEvents, I see two behaviors. The first is that during the first day when the event is created, the events do not follow the expected event time. When a new day starts, the schedule starts occurring at the expected times. The second behavior, is when the events are created, the next scheduled event is days away. Snippet included
Thanks
Bill


procedure TPluginMailRoom.SetAlarm;
var
  SE: TJvEventCollectionItem;
begin
  if JvScheduledEvents.Events.Count > 0 then
  begin
    JvScheduledEvents.Events.Items[0].Stop;
    JvScheduledEvents.Events.Clear;
  end;

  if TimesPerHour = 0 then Exit;

  SE := JvScheduledEvents.Events.Add;

  SE.Schedule.RecurringType := srkDaily;
  SE.Schedule.EndType := sekNone;
  SE.Schedule.StartDate := DateTimeToTimeStamp(Date);
  (SE.Schedule as IJclScheduleDayFrequency).StartTime := 0;
  (SE.Schedule as IJclScheduleDayFrequency).Interval :=
    (60 div TimesPerHour) * 60 * 1000;
  SE.OnExecute := JvScheduledEventsEventsExecute;
  SE.Start;

  PTSServer.StatusLog('MailRoom: Next Mail Check ' +
    DateToStr(TimeStampToDateTime(SE.Schedule.NextEvent(False))) +
    ':' + TimeToStr(TimeStampToDateTime(SE.Schedule.NextEvent(False))));
end;
TagsNo tags attached.

Activities

marcelb

2004-05-10 00:58

manager   ~0004200

Will investigate the first behavior. The second behavior could be explained by the fact that a daily schedule is set to EveryWeekDay by default (IIRC), which means it will skip the weekends. So if you tested this on saturday, it would not start firing before monday. Could that have been the issue in this case?

anonymous

2004-05-10 05:11

viewer   ~0004204

Marcel,
Yes that would explain second behavior. I'll change but won't be able to confirm till next weekend.
Thanks
Bill

obones

2004-08-03 07:24

administrator   ~0004887

This bug has not had any activity for more than a month, it is therefore considered fixed.
To the original poster: If you think the issue is still there, even after having tested with the JVCL3, please create a new bug report.

Issue History

Date Modified Username Field Change
2004-05-09 07:32 anonymous New Issue
2004-05-10 00:58 marcelb Note Added: 0004200
2004-05-10 00:58 marcelb Assigned To => marcelb
2004-05-10 00:58 marcelb Status new => feedback
2004-05-10 05:11 anonymous Note Added: 0004204
2004-08-03 07:24 obones Status feedback => resolved
2004-08-03 07:24 obones Resolution open => fixed
2004-08-03 07:24 obones Note Added: 0004887