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 -> 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.
[name] is the name of the job.
+ [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.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.
[name] is the name of the job.
+ [pre] and [post] are the optional pre and post functions.
+
[periodexpr] is the period, eg. 30 seconds.
[sh] is the shell script fragment. *)
+
+val set_variable : string -> Whenexpr.variable -> unit
+(** Set a variable during file load. *)