diff options
author | Dale Mellor <dale@rdmp.org> | 2015-10-22 06:59:21 +0100 |
---|---|---|
committer | Dale Mellor <dale@rdmp.org> | 2015-10-22 06:59:21 +0100 |
commit | c0a6eb14c257a47e9573631e5ac09e6528fba377 (patch) | |
tree | a36115815cf89f6bdfd745fb8c7ddd3ae252334c /scm/mcron/job-specifier.scm | |
parent | 024027ae2dcc425f7a3bf5bf3ff3671833b02ce6 (diff) | |
download | mcron-c0a6eb14c257a47e9573631e5ac09e6528fba377.tar.gz mcron-c0a6eb14c257a47e9573631e5ac09e6528fba377.tar.bz2 mcron-c0a6eb14c257a47e9573631e5ac09e6528fba377.zip |
Taken on board suggestions of Mathieu Lirzin as per e-mails to the bug-mcron@gnu.org mailing list around September 2015.
Diffstat (limited to 'scm/mcron/job-specifier.scm')
-rw-r--r-- | scm/mcron/job-specifier.scm | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/scm/mcron/job-specifier.scm b/scm/mcron/job-specifier.scm index cce948c..7ed912b 100644 --- a/scm/mcron/job-specifier.scm +++ b/scm/mcron/job-specifier.scm @@ -34,7 +34,7 @@ set-configuration-time job find-best-next) - #:use-module (mcron core) + #:use-module (mcron mcron-core) #:use-module (mcron environment) #:use-module (mcron vixie-time) #:re-export (append-environment-mods)) @@ -203,11 +203,16 @@ (define configuration-user (getpw (getuid))) (define configuration-time (current-time)) + + (define (set-configuration-user user) (set! configuration-user (if (or (string? user) (integer? user)) (getpw user) user))) + + + (define (set-configuration-time time) (set! configuration-time time)) @@ -233,10 +238,9 @@ ((list? action) (lambda () (primitive-eval action))) ((string? action) (lambda () (system action))) (else - (throw 'mcron-error - 2 - "job: invalid second argument (action; should be lambda" - " function, string or list)")))) + (throw 'mcron-error 2 + "job: invalid second argument (action; should be lambda " + "function, string or list)")))) (time-proc (cond ((procedure? time-proc) time-proc) @@ -244,10 +248,9 @@ ((list? time-proc) (lambda (current-time) (primitive-eval time-proc))) (else - (throw 'mcron-error - 3 - "job: invalid first argument (next-time-function; should ") - "be function, string or list)"))) + (throw 'mcron-error 3 + "job: invalid first argument (next-time-function; " + "should be function, string or list)")))) (displayable (cond ((not (null? displayable)) (car displayable)) ((procedure? action) "Lambda function") |