crontab syntax of sysyem command

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 ???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Problems about requiring gems 0
command interpretation 4
eval going boom 15
One More Bias (or perhaps I'm too novice ) 2
dbi :mysql 0
Ruby Warnings 2
Compilation and installation of Ruby 1.9 0
Ruby DBI problem 0

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top