snowhite v2.1.3 Snowhite.Scheduler.Schedule View Source

Link to this section Summary

Link to this section Types

Specs

message_def() :: {pid(), any()}

Specs

schedule_id() :: String.t() | atom()

Specs

t() :: %Snowhite.Scheduler.Schedule{
  last_execution: NaiveDateTime.t() | nil,
  message: message_def(),
  name: schedule_id(),
  time: time_def()
}

Specs

time_def() :: {:at, Time.t()}

Link to this section Functions

Link to this function

new(name, time, message)

View Source

Specs

new(schedule_id(), time_def(), message_def()) :: t()
Link to this function

put_last_execution(schedule, date)

View Source
Link to this function

should_run?(schedule, current_time)

View Source

Specs

should_run?(t(), Time.t()) :: boolean()