From owner-freebsd-questions@FreeBSD.ORG Sat Oct 28 14:03:13 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F9BA16A40F for ; Sat, 28 Oct 2006 14:03:13 +0000 (UTC) (envelope-from maxsec@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 829C543D53 for ; Sat, 28 Oct 2006 14:03:10 +0000 (GMT) (envelope-from maxsec@gmail.com) Received: by nf-out-0910.google.com with SMTP id p77so1617617nfc for ; Sat, 28 Oct 2006 07:03:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=fLg+MYtNWU26jX4/vz5MShjR80tsk7xQ4hnn5KI98wN8IMEXcOfbcyU0I4rM+DEUozE01moGmYyfMol3+V7TbKsuwp84JrSKeztGZkoazZ42UT1HNfEzWGPzAmUcm6krVzh0czIjWcX7+0sZ7NC3eqOlcKCpgxTLNXBvvAIEumE= Received: by 10.78.128.15 with SMTP id a15mr1491846hud; Sat, 28 Oct 2006 07:03:08 -0700 (PDT) Received: by 10.78.142.19 with HTTP; Sat, 28 Oct 2006 07:03:08 -0700 (PDT) Message-ID: <72cf361e0610280703r7c262b03r66add8521355574c@mail.gmail.com> Date: Sat, 28 Oct 2006 15:03:08 +0100 From: "Martin Hepworth" To: "Zbigniew Szalbot" In-Reply-To: <20061027123200.P71098@192.168.11.51> MIME-Version: 1.0 References: <20061027123200.P71098@192.168.11.51> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: system crontab X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2006 14:03:13 -0000 This will happen regularly anyway. If you want to shorten this time, look in the exim "/usr/local/etc/exim/configure" file for how to shorten/change timeout delays then you won't need to do this. -- martin On 10/27/06, Zbigniew Szalbot wrote: > > Hello, > > I would like to daily run a certain script that cleans exim's queue from > frozen messages: > > sudo exiqgrep -i -z | sudo xargs -L 1 exim -Mrm > > I have created a file called rm_frozen_msg.sh, gave it appropriate > permissions and then installed it in my user crontab. Because it did not > work I read the man and found out that I cannot run scripts as another > (root) user. Therefore I edited /etc/crontab to instruct it to run the > file daily. > > At first, it did not like sudo. As I was running it under user root > anyway, I deleted sudo from the file. Then it complained about > exiqgrep so I put the full path: /usr/local/sbin/ > > But my question is why can I run the command > > sudo exiqgrep -i -z | sudo xargs -L 1 exim -Mrm > > from the command line but I cannot use it in a file with cron? > > Thanks! > > -- > Zbigniew Szalbot > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" >