Sunday, January 27, 2008

Using Google Calendar to Monitor Software, part 4

Here's the last piece of the code I use for monitoring cron jobs with Google calendar. If you want to use it, this is the only piece you should need to customize.

You can use it for any number of calendars you want, but you need to put them all into the hash. This requires being geeky enough to know Perl. If you're geeky enough to want to monitor cron jobs with Google calendar, that's probably not a stretch.

#!/usr/bin/perl -w
# $Id: 5853 2007-04-02 16:46:01Z jhaemer $

# hash of calendar names and urls
our %url = (
frog =>

# put your gCal login and password here
our $login = '';
our $passwd = "your_password_here";

# or, you could call this
sub getpw {
use Term::ReadKey;
print "password: ";
my $password = ReadLine(0);
chomp $password;


No comments: