Tuesday, November 25, 2008

Quote of Tomorrow via RSS

The latest release of Q2OH went live last night and now it truly delivers the Quote of Tomorrow. Each night a quote is chosen at random and added to the new RSS feed. It uses the Feeds plugin and the Quartz plugin to make it happen and both are remarkable. Here is what it took to create and schedule a job as part of a Grails app:

class FeedSeedJob {

def quoteService

def cronExpression = "1 0 0 * * ?"
def group = "QotdGroup"

def execute() {
def qotd = quoteService.getQotdQuote()
println "QOTD is ${qotd.content}"

I honestly don't know how it could be any easier.

No comments:

Post a Comment