Tue
May 5th

Twitter Scheduler

In Delicious Twitter Sync I talked about one of the open source tools we use to run Quite Useful.  Another script I’ve written to help out is twitter-scheduler.  This one allows you to schedule tweets on the command line.

I use this to schedule up interesting tweets so they’re evenly distributed throughout the day.  We try to post on the hour between around GMT 10am and 7pm.

Usage

To use the script, run it with your Twitter username and password:

./scheduler.rb -u quiteuseful -p password

And leave that running.  In another terminal, schedule up tweets like this:

./scheduler.rb -a 11am -t "This will be sent at 11am"

Deleting tweets is also possible.  An ID is returned when a tweet is scheduled, and can be used with -d:

./scheduler.rb -d 33

Calling the script with -l will list the scheduled tweets.

Libraries

This script is written in Ruby and uses OpenWFE to schedule jobs.  It also uses Chronic to parse human-readable dates.  Both these libraries are easy to use and integrate with your own scripts.

Comments (View)
Related Posts Widget for Blogs by LinkWithin