SummaryRefsLogTreeCommitDiffStats
path: root/src/mcron/job-specifier.scm
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2018-03-24 01:33:22 +0100
committerMathieu Lirzin <mthl@gnu.org>2018-03-24 01:33:22 +0100
commita1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5 (patch)
tree5af1416c63282c8686eee3088d90a50fd2ff3d47 /src/mcron/job-specifier.scm
parent07017255a181114a9b1529aaa197e16b305910ba (diff)
downloadmcron-a1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5.tar.gz
mcron-a1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5.tar.bz2
mcron-a1f9e3d7a765e7a057b6c2292cb0ccebe0c697d5.zip
utils: Add 'get-user'
* src/mcron/utils.scm (get-user): New procedure. * src/mcron/job-specifier.scm (job): Use it. * src/mcron/base.scm (remove-user-jobs): Likewise.
Diffstat (limited to 'src/mcron/job-specifier.scm')
-rw-r--r--src/mcron/job-specifier.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mcron/job-specifier.scm b/src/mcron/job-specifier.scm
index d5bf590..5c8e171 100644
--- a/src/mcron/job-specifier.scm
+++ b/src/mcron/job-specifier.scm
@@ -1,6 +1,6 @@
;;;; job-specifier.scm -- public interface for defining jobs
;;; Copyright © 2003 Dale Mellor <dale_mellor@users.sourceforge.net>
-;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
+;;; Copyright © 2016, 2017, 2018 Mathieu Lirzin <mthl@gnu.org>
;;;
;;; This file is part of GNU Mcron.
;;;
@@ -30,6 +30,7 @@
#:use-module (ice-9 match)
#:use-module (mcron base)
#:use-module (mcron environment)
+ #:use-module (mcron utils)
#:use-module (mcron vixie-time)
#:use-module (srfi srfi-1)
#:re-export (append-environment-mods)
@@ -241,9 +242,7 @@ go into the list. For example, (range 1 6 2) returns '(1 3 5)."
((procedure? action) "Lambda function")
((string? action) action)
((list? action) (simple-format #f "~A" action))))
- (user* (if (or (string? user) (integer? user))
- (getpw user)
- user)))
+ (user* (get-user user)))
(add-job (lambda (current-time)
(parameterize ((%current-action-time current-time))
;; Allow for daylight savings time changes.