lib/ubiquo/template.erb in ubiquo-0.4.1 vs lib/ubiquo/template.erb in ubiquo-0.4.2
- old
+ new
@@ -85,10 +85,52 @@
else
config.notifier_email_from = 'railsmail@gnuine.com'
end
end
CODE
+# Initializer for ubiquo crontab
+initializer 'ubiquo_crontab.rb', <<-CODE
+# -*- coding: utf-8 -*-
+Ubiquo::Cron::Crontab.schedule do |cron|
+ # Who to mail on errors
+ # cron.mailto = 'errors@change.me'
+
+ # * * * * *
+ # - - - - -
+ # | | | | |
+ # | | | | +----- day of week (0 - 6) (Sunday=0)
+ # | | | +------- month (1 - 12)
+ # | | +--------- day of month (1 - 31)
+ # | +----------- hour (0 - 23)
+ # +------------- min (0 - 59)
+
+ # Examples:
+ # "30 08 10 06 *" Executes on 10th June 08:30 AM.
+ # "00 11,16 * * *" Executes at 11:00 and 16:00 on every day.
+ # "00 09-18 * * *" Executes everyday (including weekends) during the working hours 9 a.m – 6 p.m
+ # "* * * * *" Execute every minute.
+ # "*/10 * * * *" Execute every 10 minutes.
+ # "@hourly" Execute every hour.
+ # "@daily" Execute daily.
+ # "@monthly" Execute monthly.
+ # "@reboot" Execute after every reboot.
+
+ # The specification of days can be made in two fields: month day and weekday.
+ # If both are specified in an entry, they are cumulative meaning both of the entries will get executed.
+
+ # See man 5 crontab for more information.
+
+ # Executes the routes (rake) task every minute
+ # cron.rake "* * * * *", "routes"
+
+ # Executes the routes (rake) task every minute and logs debug information
+ # cron.rake "* * * * *", "routes debug='true'"
+
+ # Executes a script/runner like task
+ # cron.runner "* * * * *", "puts 6+6"
+end
+CODE
# Initializer for exception notifier
# Needs 3 params:
# appname -> Application name (Ex: test)
# exception_recipient -> email to deliver application error messages (Ex: developers@foo.com)
# sender_adress -> email to user in from when delivering error message (Ex: notifier@foo.com)
@@ -230,9 +272,10 @@
# They can then be installed with "rake gems:install" on new installations.
# config.gem "bj"
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
# config.gem "aws-s3", :lib => "aws/s3"
# config.gem "rmagick", :lib => 'RMagick'
+ config.gem "lockfile"
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named
config.plugins = [ :ubiquo_core, :all ]