From owner-freebsd-questions Thu Feb 14 14: 9:52 2002 Delivered-To: freebsd-questions@freebsd.org Received: from kabel203069.kabel.utwente.nl (kabel203069.kabel.utwente.nl [130.89.203.69]) by hub.freebsd.org (Postfix) with ESMTP id 11BB037B405 for ; Thu, 14 Feb 2002 14:09:49 -0800 (PST) Received: by kabel203069.kabel.utwente.nl (Postfix, from userid 1000) id A92681F80; Thu, 14 Feb 2002 23:09:41 +0100 (CET) Date: Thu, 14 Feb 2002 23:09:41 +0100 From: Rogier Steehouder To: Dan Langille Cc: questions@freebsd.org Subject: Re: crontab entries need a CR/LF at the end Message-ID: <20020214230941.A493@localhost> Mail-Followup-To: Rogier Steehouder , Dan Langille , questions@freebsd.org References: <200202141955.g1EJt3k28638@lists.unixathome.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200202141955.g1EJt3k28638@lists.unixathome.org>; from dan@langille.org on Thu, Feb 14, 2002 at 02:54:59PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 14-02-2002 14:54 (-0500), Dan Langille wrote: > I edited ~/crontab and added an entry. That new line did not end in a > CR/LF (i.e. I didn't hit ENTER at the end of the line). Then I did a > crontab ~/crontab and watched /var/log/cron. The job was never run. > > I then modified the crontab to contain an ENTER at the end of that line, > and did another crontab ~/crontab. Then the job run. > > I've been bitten by this at least three times. And I've seen other get it > too. IMHO, it breaks POLA. Anyone agree? I can't see anything in the > man pages about this. I must also be a simple fix. On my 4.4-RELEASE crontab(5) gives: > The ``sixth'' field (the rest of the line) specifies the command to be > run. The entire command portion of the line, up to a newline or % ^^^^^^^ > character, will be executed by /bin/sh or by the shell specified in > the SHELL variable of the cronfile. Percent-signs (%) in the command, > unless escaped with backslash (\), will be changed into newline > characters, and all data after the first % will be sent to the command > as standard input. So, yes, it needs a newline character at the end. With kind regards, Rogier Steehouder -- ___ _ -O_\ // | / Rogier Steehouder //\ / \ r.j.s@gmx.net // \ <---------------------- 25m ----------------------> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message