When something happens on my Linux server (low disk space, problems, etc.) I would like to know how could to automatically access Google Calendar and create an event in a specific calendar.
Is this possible?
When something happens on my Linux server (low disk space, problems, etc.) I would like to know how could to automatically access Google Calendar and create an event in a specific calendar.
Is this possible?
Werner,
Using Google Calendar's API with JSON-C or ATOM seems to be a clean way to add events to your calendar. You may have to read up on how the authentication is processed, but the JSON code could be as simple as the following:
POST /calendar/feeds/default/private/full HTTP/1.1
Host: www.google.com
Authorization: ...
Content-Type: application/json
GData-Version: 2.0
Content-Length: 233
{
"data": {
"title": "Tennis with Beth",
"details": "Meet for a quick lesson.",
"transparency": "opaque",
"status": "confirmed",
"location": "Rolling Lawn Courts",
"when": [
{
"start": "2010-04-17T15:00:00.000Z",
"end": "2010-04-17T17:00:00.000Z"
}
]
}
}
Here's the blog post that will help you to do just that.
Depending upon what language you are comfortable with, Google's calendar API seems like the best way to go.
All you would have to do have a executable script in your preferred language (Python, PHP, Java), implement authentication using the API and create event.
I would probably run the script as a cron job as well.