class
Mosquito::Api::PeriodicJob
- Mosquito::Api::PeriodicJob
- Reference
- Object
Overview
An interface for inspecting the state of periodic jobs.
This class provides read-only access to periodic job metadata, including the last time each periodic job was executed.
Mosquito::Api::PeriodicJob.all.each do |job|
puts "#{job.name} last ran at #{job.last_executed_at}"
end
Defined in:
mosquito/api/periodic_job.crConstructors
Class Method Summary
-
.all : Array(self)
Returns a list of all registered periodic jobs.
Instance Method Summary
-
#interval : Time::Span | Time::MonthSpan
The configured run interval for this periodic job.
-
#last_executed_at : Time | Nil
The last time this periodic job was executed, or nil if it has never run.
-
#name : String
The name of the periodic job class.
Constructor Detail
Class Method Detail
Instance Method Detail
def last_executed_at : Time | Nil
#
The last time this periodic job was executed, or nil if it has never run.