Browse files

testing text

  • Loading branch information...
1 parent 5d848a3 commit 1ce96e59c054d57486937c808446763ac9bfb269 @jexchan committed Mar 11, 2013
Showing with 29 additions and 0 deletions.
  1. +1 −0 Gemfile
  2. +5 −0 Gemfile.lock
  3. +4 −0 config/deploy.rb
  4. +19 −0 config/schedule.rb
View
1 Gemfile
@@ -14,6 +14,7 @@ gem "galetahub-simple_captcha", :require => "simple_captcha"
gem "rmagick"
gem 'capistrano'
gem 'rvm-capistrano'
+gem 'whenever', :require => false
# CanCan can not work perfectly with strong_parameters, will use slice pattern.
# TODO: Use strong_parameters when CanCan fix this issue.
#gem "strong_parameters"
View
5 Gemfile.lock
@@ -61,6 +61,7 @@ GEM
activesupport (>= 3.2.0)
childprocess (0.3.8)
ffi (~> 1.0, >= 1.0.11)
+ chronic (0.9.1)
chunky_png (1.2.7)
ckeditor (3.7.3)
mime-types
@@ -279,6 +280,9 @@ GEM
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
websocket (1.0.7)
+ whenever (0.8.2)
+ activesupport (>= 2.3.4)
+ chronic (>= 0.6.3)
xpath (1.0.0)
nokogiri (~> 1.3)
@@ -331,3 +335,4 @@ DEPENDENCIES
tddium
term-ansicolor
uglifier (>= 1.0.3)
+ whenever
View
4 config/deploy.rb
@@ -1,10 +1,14 @@
require 'bundler/capistrano'
require "rvm/capistrano"
+require "whenever/capistrano"
+
# Development server info
set :domain, "newclass.org"
set :rvm_ruby_string, 'ruby-1.9.3-p286@global'
set :rvm_type, :system
+set :whenever_command, "bundle exec whenever"
+
set :application, "newclass"
set :scm, :git
set :repository, "git@github.com:jexchan/re-education.git"
View
19 config/schedule.rb
@@ -0,0 +1,19 @@
+# Use this file to easily define all of your cron jobs.
+#
+# It's helpful, but not entirely necessary to understand cron before proceeding.
+# http://en.wikipedia.org/wiki/Cron
+
+# Example:
+#
+# set :output, "/path/to/my/cron_log.log"
+#
+every '*/15 * * * *' do
+ command "cd /root/sqlbackup"
+ command "backup perform --trigger newclass_backup -d . -c config.rb"
+end
+#
+# every 4.days do
+# runner "AnotherModel.prune_old_records"
+# end
+
+# Learn more: http://github.com/javan/whenever

0 comments on commit 1ce96e5

Please sign in to comment.