Cocktail v0.8.1 Cocktail View Source

Top level types and convenience functions.

This module holds some top-level types and a convenience function for creating a new schedule. Details available in the Cocktail.Schedule module.

Link to this section Summary

Functions

Creates a new schedule using the given start time and options

Link to this section Types

Link to this type day_atom() View Source
day_atom() ::
  :monday | :tuesday | :wednesday | :thursday | :friday | :saturday | :sunday
Link to this type day_number() View Source
day_number() :: 0..6
Link to this type frequency() View Source
frequency() :: :weekly | :daily | :hourly | :minutely | :secondly
Link to this type hour_number() View Source
hour_number() :: 0..23
Link to this type minute_number() View Source
minute_number() :: 0..59
Link to this type occurrence() View Source
occurrence() :: time() | Cocktail.Span.t()
Link to this type rule_option() View Source
rule_option() ::
  {:frequency, frequency()}
  | {:interval, pos_integer()}
  | {:count, pos_integer()}
  | {:until, time()}
  | {:days, [day()]}
  | {:hours, [hour_number()]}
  | {:minutes, [minute_number()]}
  | {:seconds, [second_number()]}
  | {:times, [Time.t()]}
  | {:time_range, time_range()}
Link to this type rule_options() View Source
rule_options() :: [rule_option()]
Link to this type schedule_option() View Source
schedule_option() :: {:duration, pos_integer()}
Link to this type schedule_options() View Source
schedule_options() :: [schedule_option()]
Link to this type second_number() View Source
second_number() :: 0..59
Link to this type time_range() View Source
time_range() :: %{
  start_time: Time.t(),
  end_time: Time.t(),
  interval_seconds: second_number()
}

Link to this section Functions

Link to this function schedule(start_time, options \\ []) View Source

Creates a new schedule using the given start time and options.

see Cocktail.Schedule.new/1 for details.