X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=lib%2Fwhenfile.mli;h=5ca68d06822b9d06bea4ac20f4c6a36e4e720db9;hp=7883fa7979cdfe5601d2634ef4c0506e99cf62a7;hb=0c9faf57f9239b0fe1c0b46353d222bb4cf5cd74;hpb=dcb2495b5a97360cfa074acbd10b1e8bde40da3e;ds=sidebyside diff --git a/lib/whenfile.mli b/lib/whenfile.mli index 7883fa7..5ca68d0 100644 --- a/lib/whenfile.mli +++ b/lib/whenfile.mli @@ -25,7 +25,7 @@ val init : Whenstate.t -> unit val get_state : unit -> Whenstate.t (** Return the updated state. Call this after parsing the file. *) -val add_when_job : Camlp4.PreCast.Loc.t -> string -> Whenexpr.cleanup option -> Camlp4.PreCast.Ast.expr -> Whenexpr.shell_script -> unit +val add_when_job : Camlp4.PreCast.Loc.t -> string -> Whenexpr.pre option -> Whenexpr.post option -> Camlp4.PreCast.Ast.expr -> Whenexpr.shell_script -> unit (** When a 'when' macro appears as a toplevel statement in an input file, it causes this function to be called. @@ -33,13 +33,13 @@ val add_when_job : Camlp4.PreCast.Loc.t -> string -> Whenexpr.cleanup option -> [name] is the name of the job. - [cleanup] is the optional cleanup function. + [pre] and [post] are the optional pre and post functions. [expr] is the expression, as an OCaml abstract syntax tree. [sh] is the shell script fragment (basically location + a big string). *) -val add_every_job : Camlp4.PreCast.Loc.t -> string -> Whenexpr.cleanup option -> Whenexpr.periodexpr -> Whenexpr.shell_script -> unit +val add_every_job : Camlp4.PreCast.Loc.t -> string -> Whenexpr.pre option -> Whenexpr.post option -> Whenexpr.periodexpr -> Whenexpr.shell_script -> unit (** When an 'every' macro appears as a toplevel statement in an input file, it causes this function to be called. @@ -47,7 +47,7 @@ val add_every_job : Camlp4.PreCast.Loc.t -> string -> Whenexpr.cleanup option -> [name] is the name of the job. - [cleanup] is the optional cleanup function. + [pre] and [post] are the optional pre and post functions. [periodexpr] is the period, eg. 30 seconds.