mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-26 11:21:42 +01:00
Add Job class
This commit is contained in:
15
examples/cronotab.rb
Normal file
15
examples/cronotab.rb
Normal 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
|
||||
Reference in New Issue
Block a user