Skip to content

Instantly share code, notes, and snippets.

@luctus
Created September 20, 2016 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luctus/af85038c478d15045949547752888c41 to your computer and use it in GitHub Desktop.
Save luctus/af85038c478d15045949547752888c41 to your computer and use it in GitHub Desktop.
whenever (gem) configuration for running exclusive (making sure that runs only once a time) tasks
job_type :exclusive_rake, "cd :path && flock -n 'tmp/pids/cron_:task.lock' -c ':environment_variable=:environment bundle exec rake :task --silent --backtrace :output'"
every 1.minute do
exclusive_rake "dailytics:run"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment