forked from OpenNeo/impress
cron via whenever for mall spider
This commit is contained in:
parent
b45faa6753
commit
0b6e22b8a6
5 changed files with 37 additions and 0 deletions
2
Gemfile
2
Gemfile
|
@ -20,6 +20,8 @@ gem 'hoptoad_notifier'
|
|||
|
||||
gem 'addressable', :require => ['addressable/template', 'addressable/uri']
|
||||
|
||||
gem 'whenever', '~> 0.6.2', :require => false
|
||||
|
||||
group :development_async, :production do
|
||||
# async wrappers
|
||||
gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git'
|
||||
|
|
|
@ -36,6 +36,7 @@ GEM
|
|||
remote: http://rubygems.org/
|
||||
specs:
|
||||
RocketAMF (0.2.1)
|
||||
aaronh-chronic (0.3.9)
|
||||
abstract (1.0.0)
|
||||
actionmailer (3.0.3)
|
||||
actionpack (= 3.0.3)
|
||||
|
@ -141,6 +142,9 @@ GEM
|
|||
tzinfo (0.3.23)
|
||||
warden (1.0.1)
|
||||
rack (>= 1.0.0)
|
||||
whenever (0.6.2)
|
||||
aaronh-chronic (>= 0.3.9)
|
||||
activesupport (>= 2.3.4)
|
||||
will_paginate (3.0.pre2)
|
||||
yui-compressor (0.9.1)
|
||||
|
||||
|
@ -169,4 +173,5 @@ DEPENDENCIES
|
|||
rspec-rails (~> 2.0.0.beta.22)
|
||||
thin (~> 1.2.7)
|
||||
warden (~> 1.0.1)
|
||||
whenever (~> 0.6.2)
|
||||
will_paginate (~> 3.0.pre2)
|
||||
|
|
30
config/schedule.rb
Normal file
30
config/schedule.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
# 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 2.hours do
|
||||
# command "/usr/bin/some_great_command"
|
||||
# runner "MyModel.some_method"
|
||||
# rake "some:great:rake:task"
|
||||
# end
|
||||
#
|
||||
# every 4.days do
|
||||
# runner "AnotherModel.prune_old_records"
|
||||
# end
|
||||
|
||||
# Learn more: http://github.com/javan/whenever
|
||||
|
||||
env :MAILTO, 'webmaster@openneo.net'
|
||||
|
||||
every :day do
|
||||
rake "items:spider_mall"
|
||||
end
|
||||
|
||||
every :hour do
|
||||
rake "items:spider_mall_assets"
|
||||
end
|
BIN
vendor/cache/aaronh-chronic-0.3.9.gem
vendored
Normal file
BIN
vendor/cache/aaronh-chronic-0.3.9.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/whenever-0.6.2.gem
vendored
Normal file
BIN
vendor/cache/whenever-0.6.2.gem
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue