U
Une bévue
i've just downloaded crontab.rb from
<http://raa.ruby-lang.org/project/crontab/>
and i've tried it using this script :
---------------------------------------------------------
#!/usr/bin/env ruby
require "crontab"
time=Time.new.to_s
p time
# => Fri Jul 07 07:37:33 CEST 2006
mm=time.gsub(/.*
\d+):.*/, '\1').to_i+1
p mm
# => the now minute + 1
tab = Crontab.new
tab.add("#{mm} 7 7 7 *") {system "ls"}
loop do
tab.run
sleep 60
end
---------------------------------------------------------
and i get the following (MacOS X latest) :
../crontab.rb:114: warning: parenthesize argument(s) for future version
../crontab.rb:176: warning: parenthesize argument(s) for future version
../crontab.rb:178: warning: parenthesize argument(s) for future version
"Fri Jul 07 07:44:22 CEST 2006"
45
../crontab.rb:113: warning: tried to create Proc object without a block
i wonder for the latest warning ???
<http://raa.ruby-lang.org/project/crontab/>
and i've tried it using this script :
---------------------------------------------------------
#!/usr/bin/env ruby
require "crontab"
time=Time.new.to_s
p time
# => Fri Jul 07 07:37:33 CEST 2006
mm=time.gsub(/.*
p mm
# => the now minute + 1
tab = Crontab.new
tab.add("#{mm} 7 7 7 *") {system "ls"}
loop do
tab.run
sleep 60
end
---------------------------------------------------------
and i get the following (MacOS X latest) :
../crontab.rb:114: warning: parenthesize argument(s) for future version
../crontab.rb:176: warning: parenthesize argument(s) for future version
../crontab.rb:178: warning: parenthesize argument(s) for future version
"Fri Jul 07 07:44:22 CEST 2006"
45
../crontab.rb:113: warning: tried to create Proc object without a block
i wonder for the latest warning ???