From 5f83aef90f0b5a3bef3baee48bc6f6cdf452155d Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Thu, 19 Oct 2017 23:22:14 +0200 Subject: 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. --- src/mcron/scripts/cron.scm | 2 +- src/mcron/scripts/mcron.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mcron/scripts') diff --git a/src/mcron/scripts/cron.scm b/src/mcron/scripts/cron.scm index d043d79..5052c32 100644 --- a/src/mcron/scripts/cron.scm +++ b/src/mcron/scripts/cron.scm @@ -157,7 +157,7 @@ option.\n") (option-ref opts 'noetc #f)) (cond ((option-ref opts 'schedule #f) ;display jobs schedule => (λ (count) - (display (get-schedule (max 1 (string->number count)))) + (display-schedule (max 1 (string->number count))) (exit 0))) (else (case (primitive-fork) ;run the daemon ((0) diff --git a/src/mcron/scripts/mcron.scm b/src/mcron/scripts/mcron.scm index 588734b..afb380f 100644 --- a/src/mcron/scripts/mcron.scm +++ b/src/mcron/scripts/mcron.scm @@ -83,7 +83,7 @@ $XDG_CONFIG_HOME is not defined uses ~/.config/cron instead)." (cond ((assq-ref opts 'schedule) ;display jobs schedule => (λ (count) - (display (get-schedule (max 1 count))) + (display-schedule (max 1 count)) (exit 0))) ((assq-ref opts 'daemon) ;run mcron as a daemon (case (primitive-fork) -- cgit v1.2.3