mirror of
https://github.com/plashchynski/crono.git
synced 2026-05-01 13:14:26 +02:00
Rename to Crono
This commit is contained in:
12
lib/generators/crono/install/install_generator.rb
Normal file
12
lib/generators/crono/install/install_generator.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module Crono
|
||||
module Generators
|
||||
class InstallGenerator < ::Rails::Generators::Base
|
||||
desc "Installs crono and generates the necessary configuration files"
|
||||
source_root File.expand_path("../templates", __FILE__)
|
||||
|
||||
def copy_config
|
||||
template 'crono.rb.erb', 'config/initializers/crono.rb'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
9
lib/generators/crono/install/templates/crono.rb.erb
Normal file
9
lib/generators/crono/install/templates/crono.rb.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
# 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.
|
||||
#
|
||||
# Crono.perform(TestJob).every 2.days, at: "15:30"
|
||||
#
|
||||
Reference in New Issue
Block a user