I’m writing a small web application that keeps track a number of “tickets”.
The users can set recurrence rules to tickets and the tickets will be created automatically based on the recurrence rules. For example, a user can set a rule to create a ticket every second Monday of every month.
My current propose is to use the iCalenlar format(RFC 2445/5545), the rule will be same as RRULE in iCal format. I will also have to write a Windows Service to check the recurrence and create tickets if the data/time is due.
My question is whether I am doing it right? Is using iCal format the most efficient way to do recurrence? Are there any alternatives to do this kind of work? Any critiques on my current design?
Thank you.
The RRULE syntax of iCal is a good way to describe recurrence, provided that it allows to express all recurrence rules you need in your application.
However, iCal just provides the syntax. You’ll need to design and implement a system that calculates the actual instances and schedules ticket creation accordingly. This is difficult to get right. You could try to use existing calendaring software for this, but I’d look into software that is designed to do what you need instead: namely cron or the Windows Task Scheduler.