Class: Quartz::CronJob

Inherits:
Object
  • Object
show all
Defined in:
lib/quartz/cron_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ CronJob

Returns a new instance of CronJob.



7
8
9
# File 'lib/quartz/cron_job.rb', line 7

def initialize(name)
  @name=name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/quartz/cron_job.rb', line 6

def name
  @name
end

Instance Method Details

#execute(context) ⇒ Object



10
11
12
13
# File 'lib/quartz/cron_job.rb', line 10

def execute(context)
  job_block = JobFactory.instance.jobs[@name]
  job_block.call
end