From owner-freebsd-questions@FreeBSD.ORG Tue Apr 20 08:04:35 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56AB1106566C for ; Tue, 20 Apr 2010 08:04:35 +0000 (UTC) (envelope-from mcoyles@horbury.wakefield.sch.uk) Received: from smtp2.yhgfl.net (smtp2.yhgfl.net [89.207.208.210]) by mx1.freebsd.org (Postfix) with ESMTP id 1268D8FC18 for ; Tue, 20 Apr 2010 08:04:34 +0000 (UTC) Received: from smtp2.yhgfl.net (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id A37851BC0B94_BCD5C7AB for ; Tue, 20 Apr 2010 07:49:14 +0000 (GMT) Received: from smtp1-wak.yhgfl.net (smtp3-wak-ext.yhgfl.net [89.207.208.42]) by smtp2.yhgfl.net (Sophos Email Appliance) with ESMTP id 4EB2A1BC0A08_BCD5C7AF for ; Tue, 20 Apr 2010 07:49:14 +0000 (GMT) Received: from horbury.wakefield.sch.uk ([10.126.96.3]) by smtp1-wak.yhgfl.net (8.13.8/8.13.8/Debian-3) with ESMTP id o3K7r2PR030716 for ; Tue, 20 Apr 2010 08:53:03 +0100 Received: from ITTEAM02 [172.16.96.253] by horbury.wakefield.sch.uk with ESMTP (SMTPD32-7.07) id AD5916D40076; Tue, 20 Apr 2010 08:52:57 +0100 From: "mcoyles" To: Date: Tue, 20 Apr 2010 08:52:58 +0100 Message-ID: <002c01cae05e$7eab3ea0$7c01bbe0$@wakefield.sch.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 thread-index: AcrgXn6AzUXVi/KcTmG8g+af70a/qg== Content-Language: en-gb X-YHGfL-MailScanner-Information: Please contact the YHGfL Foundation for more information X-YHGfL-MailScanner: Found to be clean X-YHGfL-MailScanner-MCPCheck: MCP-Clean, MCP-Checker (score=0, required 0.5) X-YHGfL-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-MailScanner-From: mcoyles@horbury.wakefield.sch.uk Cc: Subject: Kill via Cron... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mcoyles@horbury.wakefield.sch.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2010 08:04:35 -0000 Morning all - on FreeBSD 7.1 (for various reasons - don't ask) Am attempting to run the following via cron but it keeps erroring out: kill -9 `ps ax | grep backup | grep -v grep | awk '{print $1}'` && kill -9 `ps ax | grep dump | grep -v grep | awk '{print $1}'` Error: usage: kill [-s signal_name] pid ... kill -l [exit_status] kill -signal_name pid ... kill -signal_number pid ... Works OK from commandline - what do I need to change to make this cronable?? Cheers Marci