{"id":796,"date":"2011-06-24T20:20:28","date_gmt":"2011-06-25T01:20:28","guid":{"rendered":"http:\/\/anvil-of-time.com\/wordpress\/?p=796"},"modified":"2021-03-10T20:35:03","modified_gmt":"2021-03-11T01:35:03","slug":"using-icalendar-ics-files-for-event-scheduling","status":"publish","type":"post","link":"https:\/\/anvil-of-time.com\/programming\/using-icalendar-ics-files-for-event-scheduling\/","title":{"rendered":"Using ICalendar (.ICS) files for Event Scheduling"},"content":{"rendered":"<p>Here is a very easy way to schedule events from within your application. This assumes you have a way to send emails with attachments. If you are dealing with a high volume situation, you may with to write the data to a table and have the database (or some other process) send them out.<\/p>\n<p>The iCalendar format is designed to transmit calendar-based data and is meant &#8220;provide the definition of a common format for openly exchanging calendaring and scheduling information across the Internet&#8221;. It is supported by a number of products including Outlook, Lotus Notes, Google Calendar, Yahoo Calendar to name a few. See the <a href=\"http:\/\/en.wikipedia.org\/wiki\/ICalendar\" target=\"_blank\" rel=\"noopener\">article on Wikipedia <\/a>for for additional information.<\/p>\n<p>To schedule an event, create and send the following file:<\/p>\n<pre name=\"code\" class=\"VB\">BEGIN:VCALENDAR\nVERSION:2.0\nMETHOD:REQUEST\nPRODID:-\/\/MyCompany\/\/MyGreatSoftware\/\/EN\nBEGIN:VEVENT\nUID:12345\nCLASS:PUBLIC\nDTSTAMP:20110624T145010\nDTSTART:20110628T090000\nDTEND:20110628T110000\nSUMMARY:Follow Up with Big Customer\nLOCATION:Office\nORGANIZER:CN=&quot;Smith, Agent&quot; mailto:agent.smith@email.com\nPRIORITY:5\nSEQUENCE:0\nEND:VEVENT\nEND:VCALENDAR<\/pre>\n<p>In order to update or cancel a previously entered item you must know the UID and change the SEQUENCE segment. For a cancel, you change the METHOD from REQUEST to CANCEL.<\/p>\n<p>Update previously sent event.<\/p>\n<pre name=\"code\" class=\"VB\">BEGIN:VCALENDAR\nVERSION:2.0\nMETHOD:REQUEST\nPRODID:-\/\/MyCompany\/\/MyGreatSoftware\/\/EN\nBEGIN:VEVENT\nUID:12345\nCLASS:PUBLIC\nDTSTAMP:20110624T145010\nDTSTART:20110628T093000\nDTEND:20110628T113000\nSUMMARY:Change to Followup with Big Customer\nLOCATION:Office\nORGANIZER:CN=&quot;Smith, Agent&quot; mailto:agent.smith@email.com\nPRIORITY:5\nSEQUENCE:1\nEND:VEVENT\nEND:VCALENDAR<\/pre>\n<p>To Cancel an event.<\/p>\n<pre name=\"code\" class=\"VB\">BEGIN:VCALENDAR\nVERSION:2.0\nMETHOD:CANCEL\nPRODID:-\/\/MyCompany\/\/MyGreatSoftware\/\/EN\nBEGIN:VEVENT\nUID:12345\nCLASS:PUBLIC\nDTSTAMP:20110624T145010\nDTSTART:20110628T093000\nDTEND:20110628T113000\nSUMMARY:Cancel Follow up with Big Customer\nLOCATION:Office\nORGANIZER:CN=&quot;Smith, Agent&quot; mailto:agent.smith@email.com\nPRIORITY:5\nSEQUENCE:1\nEND:VEVENT\nEND:VCALENDAR<\/pre>\n<p>Note the Organizer doesn&#8217;t have to be a valid email address. Outlook allows you to look at appointments in .ics format which can give you some further insight into the process (how to set reminders and such). Note that not all applications will recognize all atributes of the .ics file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a very easy way to schedule events from within your application. This assumes you have a way to send emails with attachments. If you are dealing with a high volume situation, you may with to write the data to a table and have the database (or some other process) send them out. The&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[54,10],"tags":[55,12,16],"_links":{"self":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/796"}],"collection":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/comments?post=796"}],"version-history":[{"count":7,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/796\/revisions"}],"predecessor-version":[{"id":1963,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/796\/revisions\/1963"}],"wp:attachment":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/media?parent=796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/categories?post=796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/tags?post=796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}