Module RescriptCron.CronTime
Module for creating cron times that can be used to alter a cron job
-
val make : [ `CronString of string | `JsDate of Js.Date.t ] -> ?timezone:string -> ?utcOffset:int -> unit -> t
-
make(cronTime, timezone, utcOffset)
will create a newCronTime
. This can be used withsetTime
to change when aCronJob
is fired.Do not use
timezone
andutcOffset
together.- parameter cronTime
-
The syntax of
cronTime
can be in cron format (e.g.2 * * * * * *
) or as aJs
.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.