From c0a6eb14c257a47e9573631e5ac09e6528fba377 Mon Sep 17 00:00:00 2001 From: Dale Mellor Date: Thu, 22 Oct 2015 06:59:21 +0100 Subject: Taken on board suggestions of Mathieu Lirzin as per e-mails to the bug-mcron@gnu.org mailing list around September 2015. --- scm/mcron/job-specifier.scm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'scm/mcron/job-specifier.scm') 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") -- cgit v1.2.3