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 exec
Change your code from
class MyModel def checkPings end end
to
class MyModel def self.checkPings end end
Note there is self added to the method name.
def checkPings is an instance method for the class MyModel whereas def self.checkPings is a class method.
def checkPings
def self.checkPings