All,
I have a shell script that is creates tar file of logs. I have embeded the recipe in the cookbook.
The recipe looks like this :
cookbook_file "/var/create-tar.sh" do
source "create-tar.sh"
mode 0755
end
execute "create tar files of logs older than 1 day" do
command "sh /var/create-tar.sh"
end
The execute resource is executing the recipe. I want to schedule this shell script in cron by making an entry in cronjob.
The crontab entry should be :
*/2 * * * * sh -x /var/test.sh > /var/log/backup 2>&1
How can I add this entry in my recipe?