Package: cron Version: 3.0pl1-134 Tags: patch -- Jakub Wilk
From 999fe1caa6bb96a3dca44b3727a2c590b5cf7b8c Mon Sep 17 00:00:00 2001 From: Jakub Wilk <jw...@jwilk.net> Date: Mon, 12 Aug 2019 09:13:43 +0200 Subject: [PATCH 1/2] crontab.5: Fix misuse of en-dash in examples
Use ASCII hyphen-minus instead of en-dash in crontab examples. Fixes: commit 985302122906934fec156469ab8a0046dadf280b --- crontab.5 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/crontab.5 b/crontab.5 index d5fb17f..caca0d3 100644 --- a/crontab.5 +++ b/crontab.5 @@ -174,15 +174,15 @@ A field may be an asterisk (*), which always stands for ``first\-last''. .PP Ranges of numbers are allowed. Ranges are two numbers separated with a hyphen. The specified range is inclusive. For example, -8\(en11 for an ``hours'' entry specifies execution at hours 8, 9, 10 +8\-11 for an ``hours'' entry specifies execution at hours 8, 9, 10 and 11. .PP Lists are allowed. A list is a set of numbers (or ranges) -separated by commas. Examples: ``1,2,5,9'', ``0\(en4,8\(en12''. +separated by commas. Examples: ``1,2,5,9'', ``0\-4,8\-12''. .PP Step values can be used in conjunction with ranges. Following a range with ``/<number>'' specifies skips of the number's value -through the range. For example, ``0\(en23/2'' can be used in the hours +through the range. For example, ``0\-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is ``0,2,4,6,8,10,12,14,16,18,20,22''). Steps are also permitted after an asterisk, so if you want to say ``every two @@ -263,13 +263,13 @@ MAILTO=paul # run at 2:15pm on the first of every month \(em output mailed to paul 15 14 1 * * $HOME/bin/monthly # run at 10 pm on weekdays, annoy Joe -0 22 * * 1\(en5 mail \-s "It's 10pm" joe%Joe,%%Where are your kids?% -23 0\(en23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" +0 22 * * 1\-5 mail \-s "It's 10pm" joe%Joe,%%Where are your kids?% +23 0\-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" 5 4 * * sun echo "run at 5 after 4 every Sunday" 0 */4 1 * mon echo "run every 4th hour on the 1st and on every Monday" 0 0 */2 * sun echo "run at midn on every Sunday that's an uneven date" # Run on every second Saturday of the month -0 4 8\(en14 * * test $(date +\e%u) \-eq 6 && echo "2nd Saturday" +0 4 8\-14 * * test $(date +\e%u) \-eq 6 && echo "2nd Saturday" .fi .PP @@ -330,10 +330,10 @@ When specifying day of week, both day 0 and day 7 will be considered Sunday. BSD and AT&T seem to disagree about this. .PP Lists and ranges are allowed to co-exist in the same field. -"1\(en3,7\(en9" would be rejected by AT&T or BSD cron \(em they want -to see "1\(en3" or "7,8,9" ONLY. +"1\-3,7\-9" would be rejected by AT&T or BSD cron \(em they want +to see "1\-3" or "7,8,9" ONLY. .PP -Ranges can include "steps", so "1\(en9/2" is the same as "1,3,5,7,9". +Ranges can include "steps", so "1\-9/2" is the same as "1,3,5,7,9". .PP Months or days of the week can be specified by name. .PP @@ -388,7 +388,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%e)" = "$(LANG=C ncal | sed \-n 's/^Sa .* \e([0\(en9]\e+\e) *$/\ex1/p')" ] && echo "Last Saturday" && program_to_run +0 4 * * Sat [ "$(date +\e%e)" = "$(LANG=C ncal | sed \-n 's/^Sa .* \e([0\-9]\e+\e) *$/\ex1/p')" ] && echo "Last Saturday" && program_to_run .fi -- 2.23.0.rc1
From b07c44d4b4a5480106db9c22c7d0e356bbfa82e0 Mon Sep 17 00:00:00 2001 From: Jakub Wilk <jw...@jwilk.net> Date: Mon, 12 Aug 2019 09:16:12 +0200 Subject: [PATCH 2/2] crontab.5: Remove stray character from the LIMITATIONS example Fixes: commit 985302122906934fec156469ab8a0046dadf280b --- crontab.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crontab.5 b/crontab.5 index caca0d3..70e411d 100644 --- a/crontab.5 +++ b/crontab.5 @@ -388,7 +388,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%e)" = "$(LANG=C ncal | sed \-n 's/^Sa .* \e([0\-9]\e+\e) *$/\ex1/p')" ] && echo "Last Saturday" && program_to_run +0 4 * * Sat [ "$(date +\e%e)" = "$(LANG=C ncal | sed \-n 's/^Sa .* \e([0\-9]\e+\e) *$/\e1/p')" ] && echo "Last Saturday" && program_to_run .fi -- 2.23.0.rc1