Module RescriptCron.CronTime

Module for creating cron times that can be used to alter a cron job

type t
val make : [ `CronString of string | `JsDate of Js.Date.t ] -> ?⁠timezone:string -> ?⁠utcOffset:int -> unit -> t

make(cronTime, timezone, utcOffset) will create a new CronTime. This can be used with setTime to change when a CronJob is fired.

Do not use timezone and utcOffset together.

parameter cronTime

The syntax of cronTime can be in cron format (e.g. 2 * * * * * *) or as a Js.Date.t.

parameter timezone

Which timezone should be used (e.g. "America/Los_Angeles").

parameter utcOffset

Set an UTC offset. This is for a Moment-object, so see Moment-documentation for more info.