Skip to content

Instantly share code, notes, and snippets.

@aero
Created January 23, 2010 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aero/284520 to your computer and use it in GitHub Desktop.
Save aero/284520 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use Schedule::Cron;
use Net::Twitter::Lite;
my $cron = Schedule::Cron->new( sub {} );
$cron->add_entry( '0 0-23 * * *', \&twit );
$cron->run( detach => 0 );
sub twit {
my $t = Net::Twitter::Lite->new ( username => 'user', password => 'pass' );
$t->update( scalar localtime() );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment