Created
January 27, 2011 06:34
-
-
Save 3dd13/798157 to your computer and use it in GitHub Desktop.
Adding log purging job using chef
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
cron "housekeep application log files" do | |
user "housekeeper" | |
# mailto "[email protected]" | |
# 00:01 every night | |
hour "0" | |
minute "1" | |
# clean up logs older than 30 days | |
command "/find ~/log/application-*.log.tar.gz -mtime +30 -exec rm {} \;" | |
end |
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
# we need cron for scheduler | |
package cron do | |
action :install | |
end | |
include_recipe "housekeep::clear_log" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment