class Mosquito::PeriodicTask

Defined in:

mosquito/periodic_task.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(class __arg0 : ::Mosquito::PeriodicJob.class, interval : Time::MonthSpan | Time::Span) #

[View source]

Instance Method Detail

def class : Mosquito::PeriodicJob.class #
Description copied from class Object

Returns the runtime Class of an object.

1.class       # => Int32
"hello".class # => String

Compare it with typeof, which returns the compile-time type of an object:

random_value = rand # => 0.627423
value = random_value < 0.5 ? 1 : "hello"
value         # => "hello"
value.class   # => String
typeof(value) # => Int32 | String

[View source]
def class=(class __arg0 : Mosquito::PeriodicJob.class) #

[View source]
def execute #

[View source]
def interval : Time::Span | Time::MonthSpan #

[View source]
def interval=(interval : Time::Span | Time::MonthSpan) #

[View source]
def last_executed_at : Time #

[View source]
def last_executed_at=(last_executed_at : Time) #

[View source]
def try_to_execute : Nil #

[View source]