views:

329

answers:

2

I have a database that puts out an .ics file that looks like this:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20091211T175956Z
DTSTART:20091106T200000Z
DTEND:20091106T230000Z
SUMMARY:
END:VEVENT
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20091211T175956Z
DTSTART:20091105T220000Z
DTEND:20091106T010000Z
SUMMARY:
END:VEVENT
BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20091211T175956Z
DTSTART:20091106T200000Z
DTEND:20091106T230000Z
SUMMARY:
END:VEVENT
END:VCALENDAR

I'm able to subscribe to it easily through most email clients, even Microsoft Outlook 2007. However, after a client subscribes to the file, it's almost impossible to get it to refresh the file when updates occur.

Does anyone know how to basically force or push updates out to the clients from inside the .ics file? Or even a way to do it from inside Outlook, even if it's not on Exchange?

+1  A: 

Hi, You have to reissue the ical, but you need to do 2 thinigs:

a)Keep the same UID.

b)You need to add a SEQUENCE header (wich is a simple integer). You then increment the sequence number for each new update.

Here is what an update would look like:

BEGIN:VEVENT
UID:[email protected]
DTSTAMP:20091211T175956Z
DTSTART:20091106T200000Z
DTEND:20091106T230000Z
SUMMARY:
SEQUENCE:1
END:VEVENT

cheers!

Dave

dave wanta
Can you explain what you mean by "reissue the ical"? The .ics file sites on my server and is up to date at all times, because it draws from the database. As soon as there is a new event (not necessarily an update to an old event), it's on the .ics file. The problem is getting it to appear on the subscription application. Are you saying "SEQUENCE" per event will help with that? What about new events?
Jason Rhodes
Hi Jason -- I'm hearing 2 issues here. 1)How to get an update to the client. That is up to you, and how they get it (more of a business rule). Whether you email it, or they query a http location. 2)How an update to the iCal is recognized by the software. Let say something has changed on an individual event (ex: time, or location). To get the software to recognize the update, you need to keep the same UID for the event, and increment the sequence number. I'm telling you how to solve the 2nd issue.
dave wanta
It's more of a combination of both issues, Dave. I want to know if there's a way to alert the client that there is new/updated info, so it will refresh. We have requests coming in at various times of the day, so either the client needs to refresh every 5 min (not necessarily possible) or else the .ics file needs to be able to alert the client(s) of new/updated info. I want to know if that's possible.
Jason Rhodes
PS when I say we have "requests coming in", I mean database entries being added via an online system that should appear on calendars in under 5 min time.
Jason Rhodes
A: 

The only answer we've found to this question is: You can't do it. As of now, there's no way to control how often calendar clients will refresh and update based on your .ics file.

In other words, there's no "push" technology for calendar updates, the client program pulls whenever it feels like it. So if you are building a database with updated events that you want to push to people's calendars immediately, well... you can't. :(

Jason Rhodes