class Tasker

Defined in:

tasker.cr

Constructors

Instance Method Summary

Constructor Detail

def self.instance : Tasker #

[View source]
def self.new(sync_period = 2.minutes.total_milliseconds) #

[View source]

Instance Method Detail

def at(time : Time, &callback : -> _) : Tasker::OneShot #

Creates a once off task that occurs at a particular date and time


[View source]
def cancel(task : Tasker::Task) #

[View source]
def cancel_all #

[View source]
def cron(line : String, timezone = Time::Location.local, &callback : -> _) : Tasker::CRON #

Create a repeating event that uses a CRON line to determine the trigger time


[View source]
def every(span : Time::Span, &callback : -> _) : Tasker::Repeat #

Creates repeating task Schedules the repeat after executing the task


[View source]
def in(span : Time::Span, &callback : -> _) : Tasker::OneShot #

Creates a once off task that occurs in the future


[View source]
def no_more_tasks : Channel(Nil) #

[View source]
def num_schedules #

[View source]
def schedule(task : Task) #

[View source]
def size #

[View source]