Date: Mon, 7 Jun 2021 01:58:43 -0700 From: Tom Samplonius <tom@samplonius.org> To: freebsd-stable@freebsd.org Subject: Re: cron line continuation? Message-ID: <536D5FEC-DA23-4502-A161-D910D6805E16@samplonius.org> In-Reply-To: <8C2E306D-032F-4224-B03F-194C30E13D43@develooper.com> References: <0d9ed5fb-7b98-8fa5-2429-a00c615afc69@klop.ws> <20210606165738.f944a3649687a4ae09bb3cf6@getmail.no> <50183224.330.1623051742099@localhost> <8C2E306D-032F-4224-B03F-194C30E13D43@develooper.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_3A184214-ADF6-4941-B308-545123C1419C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 7, 2021, at 12:51 AM, Ask Bj=C3=B8rn Hansen = <ask@develooper.com> wrote: >=20 >=20 >=20 >> On Jun 7, 2021, at 00:42, Ronald Klop <ronald-lists@klop.ws> wrote: >>=20 >> which is much better readable. I can't get this to work so the = documentation might be inconsistent. >=20 > I don=E2=80=99t think cron supports escaping newline. You can escape % = as described, but (as you know) that=E2=80=99s something else. >=20 > The standard solution to this is not to write programs in the cron = config. Write a script or program elsewhere and have cron execute it. >=20 Yes, =E2=80=9C\=E2=80=9D as a continuation character is not supported. = The cron manpage is correct (no mention of using \ for anything but an = escape character). The = https://docs.freebsd.org/doc/13.0-RELEASE/usr/local/share/doc/freebsd/en_U= S.ISO8859-1/books/handbook/configtuning-cron.html = <https://docs.freebsd.org/doc/13.0-RELEASE/usr/local/share/doc/freebsd/en_= US.ISO8859-1/books/handbook/configtuning-cron.html> page is incorrect. I=E2=80=99ve also checked the source at = https://github.com/freebsd/freebsd-src/blob/373ffc62c158e52cde86a5b934ab4a= 51307f9f2e/usr.sbin/cron/lib/entry.c There is no code to merge lines = ending with a \ into a single command. And I agree, for a large number of sequential commands, a shell is = going to superior is every way. You could also add error recovery, etc. > Ask --Apple-Mail=_3A184214-ADF6-4941-B308-545123C1419C--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?536D5FEC-DA23-4502-A161-D910D6805E16>