> On Jun 7, 2021, at 12:51 AM, Ask Bjørn Hansen <a...@develooper.com> wrote:
> 
> 
> 
>> On Jun 7, 2021, at 00:42, Ronald Klop <ronald-li...@klop.ws> wrote:
>> 
>> which is much better readable. I can't get this to work so the documentation 
>> might be inconsistent.
> 
> I don’t think cron supports escaping newline. You can escape % as described, 
> but (as you know) that’s something else.
> 
> 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.
> 

  Yes, “\” 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_US.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’ve also checked the source at 
https://github.com/freebsd/freebsd-src/blob/373ffc62c158e52cde86a5b934ab4a51307f9f2e/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

Reply via email to