class

JoobQ::Scheduler

Inherits Reference < Object

Constructors

new(time_location : Time::Location = JoobQ.config.time_location, store : Store = RedisStore.instance, delay_set : String = RedisStore::DELAYED_SET)

Singleton instance

Source

Instance methods

cron(pattern : String, &block : -> )
Source
cron_scheduler
Source
delay(job : Job, delay_time : Time::Span)

Class methods for job registration

Source
delayed_scheduler
Source
enqueue(time : Time::Span)
Source
enqueue_due_jobs(current_time = Time.local)
Source
every(interval : Time::Span, job : Job.class, **args)
Source
jobs
Source
recurring_scheduler
Source
run

Polls the delayed set every 5 seconds (with backoff when that fails) until stop; calling it on a scheduler that already runs does nothing.

Source
stop

Stops the cron, recurring and delayed loops and the run loop. JoobQ.shutdown calls this for every scheduler of the configuration; embedders and specs may call it directly. Returns once no loop will start another iteration (an iteration already under way finishes first).

Source

Nested types