Add Job class

This commit is contained in:
Dzmitry Plashchynski
2015-03-04 18:31:59 +02:00
parent 36c35bce7d
commit 828488a6bc
10 changed files with 91 additions and 38 deletions

15
examples/cronotab.rb Normal file
View File

@@ -0,0 +1,15 @@
# cronotab.rb — Crono configuration example file
#
# Here you can specify periodic jobs and their schedule.
# You can specify a periodic job as a ActiveJob class in `app/jobs/`
# Actually you can use any class. The only requirement is that
# the class should implement a method `perform` without arguments.
#
class TestJob
def perform
puts "Test!"
end
end
Crono.perform(TestJob).every 5.second