This is a migrated thread and some comments may be shown as answers.

Expand Recurrence rule instances

3 Answers 96 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Costas
Top achievements
Rank 1
Costas asked on 01 Nov 2012, 10:17 AM
Hi
I am working with RadControlsForAspNetAjaxControlPanel_2012_2_91
and SQLServer 2008 R2.I found the expand recurrence rule demo posted
and i am using it to expand the recurrence rule of appointments.I am using
a windows service that collects the appointments for "execution" every minute.  
In case of an appointment execution failure i need to try to execute again
this appointment as long as there is no other appoinment that is bound to the same resource.
I am trying to get the latest instance from a task for a group but i can't.
e.g This is by Scheduler table containing two recurring appoinments
DTSTART:20121101T103000Z  DTEND:20121101T110000Z  RRULE:FREQ=HOURLY;COUNT=3;INTERVAL=1  for resource 7
DTSTART:20121101T110000Z  DTEND:20121101T113000Z  RRULE:FREQ=HOURLY;COUNT=5;INTERVAL=1 for resource 7
DTSTART:20121101T133000Z  DTEND:20121101T133500Z  RRULE:FREQ=HOURLY;COUNT=2;INTERVAL=1  for resource 8

I use the sql max function for start date but displays me the third instance from the first rule and the fifth instance from the second rule and the second instance from the third rule
Is there any other way to get the latest instance from all instances for a specific resource and for every resource???
(the fifth from second rule and the second from the third rule only)
  

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 06 Nov 2012, 09:53 AM
Hi Vivi,

 
You can retrieve each occurrences (and especially its start time) from a recurrence rule as it is done in this help topic.

hope this will be helpful.

Regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Abhi
Top achievements
Rank 1
answered on 06 Nov 2012, 12:22 PM
could u please explain it in more details
0
Plamen
Telerik team
answered on 09 Nov 2012, 08:31 AM
Hi Abhi,

 
The Occurrences property or the recurrence rule returns an enumerator that can be used to retrieve all the occurrences defined by the rule. If you need more information please let me know what exactly is not clear so I try to be more helpful.

Greetings,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Costas
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Abhi
Top achievements
Rank 1
Share this question
or