Module Sihl__.Core_schedule

type scheduled_time =
| Every of Sihl__.Core_time.duration
val equal_scheduled_time : scheduled_time -> scheduled_time -> Ppx_deriving_runtime.bool
val pp_scheduled_time : Ppx_deriving_runtime.Format.formatter -> scheduled_time -> Ppx_deriving_runtime.unit
val show_scheduled_time : scheduled_time -> Ppx_deriving_runtime.string
type t = {
label : string;
scheduled_time : scheduled_time;
fn : unit -> unit Lwt.t;
}
type stop_schedule = unit -> unit
val get_function : t -> unit -> unit Lwt.t
val run_in : t -> now:'a -> float
val scheduled_function : t -> unit -> unit Lwt.t
val create : scheduled_time -> (unit -> unit Lwt.t) -> string -> t
val every_second : scheduled_time
val every_hour : scheduled_time
val log_src : Logs.src
module Logs : Logs.LOG
val registered_schedules : t list Stdlib.ref
val schedule : t -> unit -> unit
val start : 'a -> 'a Lwt.t
val stop : 'a -> unit Lwt.t
val lifecycle : Sihl__.Core_container.lifecycle
val register : t list -> Sihl__.Core_container.Service.t