Created
September 20, 2016 19:37
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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