I want a method to be executed every 5 minutes, I implemented whenever for ruby (cron). But it does not work. I think my method is not accessible.
The method I want to execute is located in a class. I think I have to make that method static so I can access it with
every 5.minutes do
gate = Net::Ping::External.new("10.10.1.1")
@monitor_ping = Ping.new()
MonitorPing.WAN = true
MonitorPing.WAN = false
To declare a static method, write ...
def self.checkPings # A static method end
... or ...
class Myclass extend self def checkPings # Its static method end end