Package: cron Version: 3.0pl1-127 Severity: minor Tags: patch Dear Maintainer,
Here are three small patches for the crontab.5 manpage. The third, fixing the example, was mostly prompted by the mixed "`... $( ... ) ...`" usage, but also because it's more complicated than it need be, so dificult to understand. Cheers, Phil.
>From c9f07c7ab4e06631ca6b280b663ef004685a2e31 Mon Sep 17 00:00:00 2001 From: Philip Hands <p...@hands.com> Date: Thu, 16 Jul 2015 10:25:16 +0100 Subject: [PATCH 1/3] general typos --- crontab.5 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crontab.5 b/crontab.5 index 66ba2e4..5f79f8e 100644 --- a/crontab.5 +++ b/crontab.5 @@ -71,7 +71,7 @@ will not work as you might expect. And neither will this work B=2 C=$A $B .PP -There will not be any subsitution for the defined variables in the +There will not be any substitution for the defined variables in the last value. .PP An alternative for setting up the commands path is using the fact that @@ -121,7 +121,7 @@ By default, cron will send mail using the mail "Content-Type:" header of "text/plain" with the "charset=" parameter set to the charmap / codeset of the locale in which .IR crond (8) -is started up - ie. either the default system locale, if no LC_* environment +is started up - i.e. either the default system locale, if no LC_* environment variables are set, or the locale specified by the LC_* environment variables ( see .IR locale (7) ). @@ -265,7 +265,7 @@ MAILTO=paul .fi .SH EXAMPLE SYSTEM CRON FILE -The following lists the content of a regular system-wide crontab file. Unlinke a +The following lists the content of a regular system-wide crontab file. Unlike a user's crontab, this file has the username field, as used by /etc/crontab. .nf @@ -327,7 +327,7 @@ image off. For example, it is not straightforward to define the last weekday of a month. If a task needs to be run in a specific period of time that cannot be defined in the .I crontab -syntaxs the best approach would be to have the program itself check the +syntax, the best approach would be to have the program itself check the date and time information and continue execution only if the period matches the desired one. @@ -346,7 +346,7 @@ the following wrapper code: .SH DIAGNOSTICS cron requires that each entry in a crontab end in a newline character. If the -last entry in a crontab is missing a newline (ie, terminated by EOF), cron will +last entry in a crontab is missing a newline (i.e. terminated by EOF), cron will consider the crontab (at least partially) broken. A warning will be written to syslog. -- 2.1.4
>From a3318cde1257d6559d15c034f036bed653f8ee3b Mon Sep 17 00:00:00 2001 From: Philip Hands <p...@hands.com> Date: Thu, 16 Jul 2015 10:25:51 +0100 Subject: [PATCH 2/3] fixup wording about syntax limitations --- crontab.5 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crontab.5 b/crontab.5 index 5f79f8e..ede9881 100644 --- a/crontab.5 +++ b/crontab.5 @@ -322,10 +322,10 @@ of the crontab tasks themselves. The .I crontab -syntax does not make it possible to define all possible periods one could -image off. For example, it is not straightforward to define the last -weekday of a month. If a task needs to be run in a specific period of time -that cannot be defined in the +syntax does not make it possible to define all possible periods one can +imagine. For example, it is not straightforward to define the last +weekday of a month. +To have a task run in a time period that cannot be defined using .I crontab syntax, the best approach would be to have the program itself check the date and time information and continue execution only if the period -- 2.1.4
>From c4652d27df7bb4a7557f245925b9948a5931e744 Mon Sep 17 00:00:00 2001 From: Philip Hands <p...@hands.com> Date: Thu, 16 Jul 2015 11:27:46 +0100 Subject: [PATCH 3/3] make "Last Saturday" example less twisted --- crontab.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crontab.5 b/crontab.5 index ede9881..363c3c5 100644 --- a/crontab.5 +++ b/crontab.5 @@ -340,7 +340,7 @@ For example, to run a program the last Saturday of every month you could use the following wrapper code: .nf -0 4 * * Sat [ "$(date +\\%e)" = "`ncal | grep $(date +\\%a | sed \-e 's/.$//') | sed \-e 's/^.*\\s\\([0-9]\\+\\)\\s*$/\\1/'`" ] && echo "Last Saturday" && program_to_run +0 4 * * Sat [ "$(date +\\%e)" = "$(LANG=C ncal | sed -n 's/^Sa .* \\([0-9]\\+\\) *$/\\1/p')" ] && echo "Last Saturday" && program_to_run .fi -- 2.1.4