SummaryRefsLogTreeCommitDiffStats
path: root/src/mcron/job-specifier.scm
Commit message (Expand)AuthorAgeFilesLines
* project: banish need for C compiler...This patch gets rid of the thin veneer that we currently have around the three executables. This was done for historical reasons (circa 2003 Guile couldnʼt deal with process signals and forks). In fact these problems were fixed many moons ago, and there is now no need for it. The project becomes 100% Guile! Many files are affected; interested coders should use the GIT repository to understand the details of all the changes. Dale Mellor2020-04-201-9/+10
* job-specifier: Box 'configuration-user' global variable...* src/mcron/job-specifier.scm (configuration-user): Box it using SRFI-111 to be explicit about the mutability of this object. (job): Adapt. (set-configuration-user): Adapt and use 'get-user'. * tests/job-specifier.scm ("set-configuration-user: passwd entry") ("set-configuration-user: invalid uid", "set-configuration-user: uid") ("set-configuration-user: invalid spec") ("set-configuration-user: name"): New tests. Mathieu Lirzin2018-03-271-6/+4
* job-specifier: Fix typo "implement" => "implementation"...* src/mcron/job-specifier.scm (%find-best-next): Fix typo. Mathieu Lirzin2018-03-271-1/+2
* job-specifier: Adapt 'bump-time' to 'next-...-from' procedures...This is a follow-up to commit 913e3c65e4f56476e8ac69f4892cf92c125751ec. Since 'next-...-from' procedures now uses an '#:optional' argument instead of a dotted optional arguments list, 'bump-time' doesn't need to unwrap VALUE-LIST anymore. * src/mcron/job-specifier.scm (bump-time): Pass VALUE-LIST directly to '%find-best-next'. * tests/job-specifier.scm ("next-hour-from"): New test. * NEWS: Update. Reported-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin2018-03-261-15/+9
* job-specifier: Preserve '%find-best-next' arguments exactness...The behavior of the 'min' procedure which converts its parameters to inexact numbers when at least one of them is inexact was causing '%find-best-next' to always return real numbers. * src/mcron/job-specifier.scm (%find-best-next): Preserve the exactness of numbers in NEXT-LIST. * tests/job-specifier.scm ("%find-best-next: exact"): New test. Reported-by: Ludovic Courtès <ludo@gnu.org> Mathieu Lirzin2018-03-261-2/+6
* 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. Mathieu Lirzin2018-03-241-4/+3
* job-specifier: Use 'simple-format'...* src/mcron/job-specifier.scm (job): Use 'simple-format' instead of 'with-output-to-string'. Mathieu Lirzin2018-03-231-4/+3
* tests: Add 'schedule.sh'...* tests/schedule.sh: New test. * Makefile.am (TESTS): Add it. * src/mcron/job-specifier.scm (configuration-time): Use SOURCE_DATE_EPOCH for reproducible tests. Mathieu Lirzin2018-03-161-1/+4
* job-specifier: Remove dependency on SRFI-26....* src/mcron/job-specifier.scm (range): Use plain lambda instead of 'cut' and 'cute'. Mathieu Lirzin2017-09-281-3/+6
* maint: Reformat copyright notices and copying permission statements.Mathieu Lirzin2016-12-281-24/+26
* job-specifier: Use #:optional keyword argument....* src/mcron/job-specifier.scm (next-year, next-year-from, next-month) (next-month-from, next-day, next-day-from, next-hour, next-hour-from) (next-minute, next-minute-from, next-second, next-second-from): Use #:optional keyword argument. (maybe-args): Remove unneeded procedure. Mathieu Lirzin2016-12-281-26/+28
* job-specifier: Add %current-action-time parameter object....* src/mcron/job-specifier.scm (current-action-time): Rename to ... (%current-action-time): ... this. Make it a parameter object. (job, maybe-args): Adapt. Mathieu Lirzin2016-12-281-26/+21
* job-specifier: Rewrite 'bump-time'....* src/mcron/job-specifier.scm (bump-time): Use 'match'. Mathieu Lirzin2016-12-281-28/+27
* job-specifier: Use 'inf' thunk....* src/mcron/job-specifier.scm (%find-best-next): Call 'inf' thunk instead of defining an arbitrary high integer. (bump-time): Adapt to it. Mathieu Lirzin2016-12-011-6/+6
* job-specifier: job: Add #:user keyword argument....* src/mcron/job-specifier.scm (job): Add #:user keyword argument. * doc/mcron.texi (Job specification): Document it. Mathieu Lirzin2016-05-071-4/+8
* base: Rename (mcron core) module to (mcron base)....The 'configure' script deletes the 'core.*' files. Having a file named 'base.scm' instead of 'core.scm' simplifies the build process without changing the semantics. * src/mcron/mcron-core.scm: Rename to ... * src/mcron/base.scm: ... this. All module users changed. * Makefile.am (MODULES): Add 'src/mcron/base.scm'. (CP): Remove variable. (src/mcron/core.scm): Remove target. (GEN_MODULES): Remove 'src/mcron/core.scm'. (dist_mcronmodule_DATA): Remove 'src/mcron/mcron-core.scm' * doc/mcron.texi: Adapt to name change. * .gitignore: Update. Mathieu Lirzin2016-05-071-3/+4
* all: Rename 'scm' directory to 'src'....* scm/mcron/config.scm.in: Rename to ... * src/mcron/config.scm.in: ... this. * scm/mcron/crontab.scm: Rename to ... * src/mcron/crontab.scm: ... this. * scm/mcron/environment.scm: Rename to ... * src/mcron/environment.scm: ... this. * scm/mcron/job-specifier.scm: Rename to ... * src/mcron/job-specifier.scm: ... this. * scm/mcron/main.scm: Rename to ... * src/mcron/main.scm: ... this. * scm/mcron/mcron-core.scm: Rename to ... * src/mcron/mcron-core.scm: ... this. * scm/mcron/redirect.scm: Rename to ... * src/mcron/redirect.scm: ... this. * scm/mcron/vixie-specification.scm: Rename to ... * src/mcron/vixie-specification.scm: ... this. * scm/mcron/vixie-time.scm: Rename to ... * src/mcron/vixie-time.scm: ... this. * mcron.c: Rename to ... * src/mcron.c: ... this. * Makefile.am: Adapt to them. * build-aux/pre-inst-env.in: Likewise. * configure.ac (AC_CONFIG_FILES): Likewise. (AC_CONFIG_HEADER): Set to 'src/config.h'. * .gitignore: Update. Mathieu Lirzin2016-05-071-0/+253