SummaryRefsLogTreeCommitDiffStats
path: root/doc
Commit message (Expand)AuthorAgeFilesLines
* Remove (next-week) from texinfo documentation, discuss equivalent as example....It has been decided not to implement the (next-week) procedure in the program, so we need to remove the references to it in the manual. The reason for the omission is discussed in a new extended example section, and code is provided to illustrate how the functionality can be implemented if needed. The change also makes some alteration to the flow of sections in the document, and implicitly fixes some problems in the flow that the previous document had, with regards to linking the GNU Free Documentation License in the document structure. * doc/mcron.texi: modifications as described. Dale Mellor2023-03-151-8/+28
* base: Annotate output with job information....Before this change, it was difficult to discern which job emitted which output, as there was no information connecting the job to the output it produced. This change rectifies that by annotating each line output by cron/mcron with a prefix that contains a timestamp and the job name. It also reports about when the job runs and whether it completed successfully or failed. It was initially suggested here: <https://issues.guix.gnu.org/36510>. Thanks to the fine people from the #guile libera.chat IRC channel for providing ideas and help; this change would not have been possible without them! * src/mcron/base.scm (install-suspendable-ports!): Install suspendable ports. (%date-format, %log-format): New parameters. (validate-date-format, validate-log-format): New procedures. (<job-data>): New record. (run-job): Update doc. Redirect stdout and stderr to a pipe. Return a <job-data> instance containing the input port and other information about the job. Output job status messages. (process-output): New procedure. (child-cleanup): Add docstring. Use positive logic. Call 'process-output' one last time after a child process is collected. (run-job-loop): Add a CHILDREN-DATA variable to the loop. Provide the open file descriptors of the children ports to select*, and collect their output when they trigger select. * tests/base.scm ("run-job: basic"): Adjust and fix indentation. (dummy-job/capture-output): New procedure. ("run-job, output"): New test. ("validate-date-format, valid", "validate-date-format, invalid") ("validate-log-format, valid", "validate-log-format, invalid") ("run-job, output with custom format", "run-job, failure") ("run-job, failure in shell action"): New tests. * src/mcron/scripts/cron.scm (show-help): Document new options. (%options) [log-format, date-format]: New options. (main): Parameterize the main loop with the new parameter options (or their default values when not provided); move exception handling elsewhere (see below). * src/mcron/scripts/mcron.scm: Likewise. * src/cron.in: Install error handler here. * src/mcron.in: Likewise. * doc/mcron.texi: Document new cron and mcron options, as well as new (mcron base) APIs. * tests/basic.sh: Test the new options. Suggested-by: Robert Vollmert <rob@vllmrt.net> Maxim Cournoyer2022-07-071-0/+84
* documentation: extensive editing of info manual after a note from Paul Vixie....Paul has been in touch to say that the crontab format was not his invention, and that his program was based off of V7's cron's functionality, not later AT&T and Berkeley ones. Thus the mcron manual is edited extensively to emphasise more the POSIX standard crontab format, and to point out a more accurate history of cron developments. * doc/mcron.texi: small changes throughout the document. Dale Mellor2022-01-101-121/+136
* documentation: Bug fix in a simple example....The second example under the manual heading Simple Examples does not work. The call to next-minute-from errs because the second argument must be a list. It can’t be the raw number 15. Thanks to Colton Lewis. * doc/mcron.texi: edited text. Dale Mellor2021-09-031-1/+1
* doc/mcron.texi: Make the manual gender-neutral....Replace his/hers with theirs, etc. *doc/mcron.text: light edits only. Dale Mellor2020-04-201-6/+6
* doc: Fix “Every second Sunday” example...* doc/mcron.texi (Every second Sunday): If the first day of the month is Sunday, then the second Sunday of the month is seven days later not eight. Adam Tack2019-02-111-1/+1
* base: Add '<schedule>' record data type...Reifying the notion of a schedule helps reasoning about the code. Passing a schedule as an argument to related procedures allows writing simpler unit tests. * src/mcron/base.scm(<schedule>): New record data type. (make-schedule, schedule-user, set-schedule-user!) (schedule-system, set-schedule-system!) (schedule-current, set-schedule-current!): New procedures. (system-job-list, user-job-list, configuration-source): Replace those global variables with ... (%global-schedule): ... this global <schedule> instance. * src/mcron/base.scm (use-system-job-list, use-user-job-list) (remove-user-jobs, clear-system-jobs, add-job, find-next-jobs) (display-schedule, run-job-loop): Add '#:SCHEDULE' keyword argument. * doc/mcron.texi (The base module): Update documentation. Mathieu Lirzin2018-03-241-5/+10
* 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. Mathieu Lirzin2018-03-161-2/+5
* doc: Use 'unless' form...* doc/mcron.texi (Invoking cron or crond): Use 'unless' form and put "/etc/crontab" inside a @code command. Mathieu Lirzin2017-09-281-3/+3
* 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-12/+13
* 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-12/+12
* doc: Include a copy of the GNU FDL....* doc/fdl.texi: New file. * doc/mcron.texi: Include it. * makefile.am (doc_mcron_TEXINFOS): New variable. Mathieu Lirzin2016-05-072-0/+511
* build: Fix build of the manual....* mcron.texinfo.in: Rename to ... * doc/mcron.texi: ... this. * doc/config.texi.in: New file. * configure.ac: Adapt to it. * makefile.am: Likewise. * .gitignore: Likewise. * README--git: Likewise. Mathieu Lirzin2016-05-072-0/+1342