发生更新时刷新 .ICS 文件

发布于 2024-08-14 16:00:28 字数 1091 浏览 6 评论 0原文

我有一个数据库,它提供了一个如下所示的 .ics 文件:

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

我可以通过大多数电子邮件客户端(甚至 Microsoft Outlook 2007)轻松订阅它。但是,在客户端订阅该文件后,几乎不可能获得它在更新发生时刷新文件。

有没有办法从 .ics 文件内部强制或推送更新给客户端?或者从 Outlook 内部,即使它不在 Exchange 上?

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.

Is there a way to force or push updates out to the clients from inside the .ics file? Or from inside Outlook, even if it's not on Exchange?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝眼睛不忧郁 2024-08-21 16:00:28

您必须重新签发 ical,但需要做 2 件事:

  1. 保留相同的 UID。

  2. 您需要添加一个 SEQUENCE 标头(这是一个简单的整数)。然后,您可以为每个新更新增加序列号。

更新如下:

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

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

  1. Keep the same UID.

  2. You need to add a SEQUENCE header (which 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
坏尐絯 2024-08-21 16:00:28

对于这个问题,我们找到的唯一答案是:你做不到。截至目前,无法控制日历客户端根据 .ics 文件刷新和更新的频率。

换句话说,日历更新没有“推送”技术,客户端程序会随时拉取。因此,如果您正在构建一个包含更新事件的数据库,并希望立即将其推送到人们的日历中,那么……您做不到。 :(

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. :(

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文