Skip to content

Instantly share code, notes, and snippets.

@ricktessner
Forked from evizitei/default_whenever.rb
Created April 27, 2011 21:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricktessner/945208 to your computer and use it in GitHub Desktop.
Save ricktessner/945208 to your computer and use it in GitHub Desktop.
Whenever Chef Recipe on EY AppCloud
#
# Cookbook Name:: whenever
# Recipe:: default
#
ey_cloud_report "whenever" do
message "starting whenever recipe"
end
# Set your application name here
appname = "therapylogs"
if ['solo', 'util'].include?(node[:instance_role])
# be sure to replace "app_name" with the name of your application.
local_user = node[:users].first
execute "whenever" do
cwd "/data/#{appname}/current"
user local_user[:username]
command "whenever --update-crontab '#{appname}_#{node[:environment][:framework_env]}'"
action :run
end
ey_cloud_report "whenever" do
message "whenever recipe complete"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment