Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
crontab syntax of sysyem command
pere.noel
7/7/2006 5:50:00 AM
i've just downloaded crontab.rb from
<
http://raa.ruby-lang.org/project/cr...
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 ???
--
une bévue
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
crontab syntax of sysyem command
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password