mirror of
https://github.com/plashchynski/crono.git
synced 2026-11-23 16:44:10 +01:00
Add Job class
This commit is contained in:
1 parent
36c35bce7d
commit
828488a6bc
10 files changed
+91
-38
No files matched your search
@@ -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