SummaryRefsLogTreeCommitDiffStats
path: root/src/mcron/core.scm
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2017-10-19 23:22:14 +0200
committerMathieu Lirzin <mthl@gnu.org>2018-03-16 21:41:14 +0100
commit5f83aef90f0b5a3bef3baee48bc6f6cdf452155d (patch)
tree463d736d525a8237089a700cf375fb755fc0b5a6 /src/mcron/core.scm
parentb80020ef782921df147b957c4041f4b61d61c673 (diff)
downloadmcron-5f83aef90f0b5a3bef3baee48bc6f6cdf452155d.tar.gz
mcron-5f83aef90f0b5a3bef3baee48bc6f6cdf452155d.tar.bz2
mcron-5f83aef90f0b5a3bef3baee48bc6f6cdf452155d.zip
base: Add 'display-schedule' procedure
This procedure is a more generic and less coupled version of 'get-schedule' which has been kept for backward compatibility and deprecated. * src/mcron/base.scm (display-schedule): New procedure. (get-schedule): Move to ... * src/mcron/core.scm: ... here. * src/mcron/scripts/cron.scm (main): Use 'display-schedule'. * src/mcron/scripts/mcron.scm (main): Likewise. * doc/mcron.texi (The base module): Document it.
Diffstat (limited to 'src/mcron/core.scm')
-rw-r--r--src/mcron/core.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mcron/core.scm b/src/mcron/core.scm
index fcf96af..987881d 100644
--- a/src/mcron/core.scm
+++ b/src/mcron/core.scm
@@ -20,9 +20,10 @@
(define-module (mcron core)
#:use-module (mcron base)
+ #:export (;; Deprecated
+ get-schedule)
#:re-export (add-job
remove-user-jobs
- get-schedule
run-job-loop
clear-environment-mods
append-environment-mods
@@ -30,3 +31,7 @@
use-system-job-list
use-user-job-list
clear-system-jobs))
+
+(define (get-schedule count)
+ (with-output-to-string
+ (lambda () (display-schedule count))))