Skip to content
Justin Roberson edited this page Jul 27, 2015 · 3 revisions

Listener

Listen adapter

DSL usage:

listen '/path/to/directory', to: '/other/directory/', two_way_sync: true

# command aliasing (:to and :copy_to are the same)
listen '/path/to/directory', copy_to: 'rsync://some-server:/other/directory/'

# callback example
listen '/path/to/directory' do 
  rsync directory, to: 'ssh://some-server:/other/directory/'
  puts "callback example"
end

When

Whenever adapter

DSL usage:

every :sunday, at: '12pm', copy: '/path/to/directory', to: '/other/directory/'

every 3.hours do 
  rsync directory, to: 'ssh://some-server:/other/directory/'
  puts "callback example"
end

Clone this wiki locally