Cocktail v0.8.2 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
frequency()
View Source
frequency() :: :weekly | :daily | :hourly | :minutely | :secondly
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
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
schedule(time(), schedule_options()) :: Cocktail.Schedule.t()
Creates a new schedule using the given start time and options.
see Cocktail.Schedule.new/1
for details.