class Rufus::CronJob


A cron job.

def initialize (scheduler, cron_id, line, params, &block)

def initialize (scheduler, cron_id, line, params, &block)
    super(scheduler, cron_id, params, &block)
    if line.is_a?(String)
        @cron_line = CronLine.new(line)
    elsif line.is_a?(CronLine)
        @cron_line = line
    else
        raise \
            "Cannot initialize a CronJob " +
            "with a param of class #{line.class}"
    end
end

def matches? (time)


has to fire this CronJob instance.
This is the method called by the scheduler to determine if it
def matches? (time)
    @cron_line.matches? time
end

def schedule_info


Job. Like for example "60/3 * * * Sun".
Returns the original cron tab string used to schedule this
def schedule_info
    @cron_line.original
end

def trigger


As the name implies.
def trigger
    @block.call @job_id, @cron_line
end