Hi Joshua,
From the path in the error message I posted I'm guessing I'm using 0.8.1
I say I'm guessing because it's automatically installed by scalarium at boot
time and in a "special" way as gem list doesn't give chef in the list,
neither does dpkg -l.
I've read in the doc that if you leave out all time variables, it will put a
- in all columns of the cron task.
I'll try without the space in the name and report back
cheers
Raph
On Tue, Feb 15, 2011 at 6:32 PM, Joshua Miller jassinpain@gmail.com wrote:
I am not in front of my computer right now but I use the cron entry all the
time with out error.
Since you did not give a chef version I will assume 0.9.12 and
would guess you need at least 1 time variable. Give that a try and
please let me know.
Joshua
Run a program on the fifth hour of the day
cron "noop" do
hour "5"
minute "0"
command "/bin/true"
end
I also am not sure you can use spaces in the cron name as I have always
followed the example on the wiki.....
cron "ganglia_tomcat_thread_max" do
command "/usr/bin/gmetric -n 'tomcat threads max' -t uint32 -v
/usr/local/bin/tomcat-stat --thread-max
"
only_if do File.exist?("/home/jboss") end
end
On Feb 15, 2011, at 5:06 AM, Raphael Bauduin rblists@gmail.com wrote:
Hi,
I get a broken pipe error when creating a cron tasks. The cron file is
empty when the recipe is run.
Here's the error message:
[Mon, 14 Feb 2011 07:39:36 +0000] DEBUG: Cron empty for 'deploy'
[Mon, 14 Feb 2011 07:39:36 +0000] ERROR: cron[Add scout cron task]
(/root/scalarium-agent/site-cookbooks/scout/recipes/install.rb line
23) had an error:
Broken pipe
/root/scalarium-agent/bin/../vendor/gems/gems/naked-chef-0.8.1/bin/../lib/chef/provider/cron.rb:147:in
`write'
Line 23 of the recipe is
cron "Add scout cron task" do
action :create
command "/usr/local/bin/scout #{MYID]}"
user "deploy"
end
line 147 of cron.rb is:
status = popen4("crontab -u #{@new_resource.user} -",
:waitlast => true) do |pid, stdin, stdout, stderr|
crontab.each { |line| stdin.puts "#{line}" }
end
I've seen I'm not the only one to get this problem (look at the bottom
of this page: GitHub - gcao/chef: Chef configuration for EC2) but I have not found any
explanations or solutions to this. Any hint?
Thanks
Raph
--
Web database: http://www.myowndb.comhttp://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org
http://www.fosdem.org
--
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org