diff options
author | atsb <atsb@atsb> | 2020-04-22 20:31:34 +0200 |
---|---|---|
committer | atsb <atsb@atsb> | 2020-04-22 20:31:34 +0200 |
commit | 6360e88416763db759a8df2afab0b7ab0dfcb36e (patch) | |
tree | 9008b15f214aaa993f67fa4cd92f099b1bdc4a45 /src/mcron/job-specifier.scm | |
parent | f22de155b8e75918c9030897a01e070a8af02661 (diff) | |
parent | 1eedf3b6d24f421ccdb8798b053ee718d1051651 (diff) | |
download | mcron-6360e88416763db759a8df2afab0b7ab0dfcb36e.tar.gz mcron-6360e88416763db759a8df2afab0b7ab0dfcb36e.tar.bz2 mcron-6360e88416763db759a8df2afab0b7ab0dfcb36e.zip |
merge from dm-v1.2.0 part 1
Diffstat (limited to 'src/mcron/job-specifier.scm')
-rw-r--r-- | src/mcron/job-specifier.scm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mcron/job-specifier.scm b/src/mcron/job-specifier.scm index 120bf99..7eb2304 100644 --- a/src/mcron/job-specifier.scm +++ b/src/mcron/job-specifier.scm @@ -202,14 +202,14 @@ go into the list. For example, (range 1 6 2) returns '(1 3 5)." ;; The job function, available to configuration files for adding a job rule to ;; the system. ;; -;; Here we must 'normalize' the next-time-function so that it is always a lambda -;; function which takes one argument (the last time the job ran) and returns a -;; single value (the next time the job should run). If the input value is a -;; string this is parsed as a Vixie-style time specification, and if it is a -;; list then we arrange to eval it (but note that such lists are expected to -;; ignore the function parameter - the last run time is always read from the -;; %CURRENT-ACTION-TIME parameter object). A similar normalization is applied to -;; the action. +;; Here we must 'normalize' the next-time-function so that it is always a +;; lambda function which takes one argument (the last time the job ran) and +;; returns a single value (the next time the job should run). If the input +;; value is a string this is parsed as a Vixie-style time specification, and +;; if it is a list then we arrange to eval it (but note that such lists are +;; expected to ignore the function parameter - the last run time is always +;; read from the %CURRENT-ACTION-TIME parameter object). A similar +;; normalization is applied to the action. ;; ;; Here we also compute the first time that the job is supposed to run, by ;; finding the next legitimate time from the current configuration time (set @@ -229,7 +229,8 @@ go into the list. For example, (range 1 6 2) returns '(1 3 5)." (cond ((procedure? time-proc) time-proc) ((string? time-proc) (parse-vixie-time time-proc)) ((list? time-proc) (lambda (current-time) - (primitive-eval time-proc))) + (eval time-proc + (resolve-module '(mcron job-specifier))))) (else (throw 'mcron-error 3 "job: invalid first argument (next-time-function; " |