Mosquito::PeriodicJobRun
Constructors
Instance methods
class
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
class=(class __arg0 : Mosquito::PeriodicJob.class)
Sourceinterval
Sourcelast_executed_at=(time : Time)
Updates the last executed timestamp in the backend, and schedules the metadata for deletion after 3*interval seconds.
For Time::Span intervals, the TTL is set to 3 * interval. For Time::MonthSpan intervals, the TTL is set to approximately 3 * interval.
A month is approximated to 2635200 seconds, or 30.5 days.
metadata
Sourcetry_to_execute
Check the last executed timestamp against the current time, and enqueue the job if it's time to execute.