From 84717493a8076b90eeaa6943f10c6d79a2a23cf2 Mon Sep 17 00:00:00 2001 From: Dzmitry Plashchynski Date: Sat, 7 Mar 2015 03:49:29 +0200 Subject: [PATCH] Simplify text in examples --- examples/cronotab.rb | 14 +++++++------- .../crono/install/templates/cronotab.rb.erb | 14 ++++++++++---- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/examples/cronotab.rb b/examples/cronotab.rb index 17ca1ba..647d841 100644 --- a/examples/cronotab.rb +++ b/examples/cronotab.rb @@ -1,15 +1,15 @@ -# cronotab.rb — Crono configuration example file +# cronotab.rb — Crono configuration 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. +# Here you can specify periodic jobs and schedule. +# You can use ActiveJob's jobs from `app/jobs/` +# You can use any class. The only requirement is that +# class should have a method `perform` without arguments. # - class TestJob def perform puts "Test!" end end -Crono.perform(TestJob).every 5.second +Crono.perform(TestJob).every 2.days, at: "15:30" + diff --git a/lib/generators/crono/install/templates/cronotab.rb.erb b/lib/generators/crono/install/templates/cronotab.rb.erb index 256a66e..16d3d4e 100644 --- a/lib/generators/crono/install/templates/cronotab.rb.erb +++ b/lib/generators/crono/install/templates/cronotab.rb.erb @@ -1,9 +1,15 @@ # cronotab.rb — Crono configuration 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. +# Here you can specify periodic jobs and schedule. +# You can use ActiveJob's jobs from `app/jobs/` +# You can use any class. The only requirement is that +# class should have a method `perform` without arguments. +# +# class TestJob +# def perform +# puts "Test!" +# end +# end # # Crono.perform(TestJob).every 2.days, at: "15:30" #