From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16842 invoked from network); 18 Dec 1997 21:44:16 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 18 Dec 1997 21:44:16 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id QAA11003; Thu, 18 Dec 1997 16:11:48 -0500 (EST) Resent-Date: Thu, 18 Dec 1997 16:11:31 -0500 (EST) Date: Thu, 18 Dec 1997 15:11:47 -0600 (CST) From: Frank Li To: Jason Zapman II Cc: zsh-users@math.gatech.edu Subject: Re: interactive vs cron called In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"Ur_mZ3.0.9h2.26Pcq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1208 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On 18 Dec 1997, Jason Zapman II wrote: > Is there a way to tell if a script is being called by cron or via > interactive script? I'm writing something to tell me when disk usage of > various partitions get's to dangerous levels. When it's run via cron, I > want it to mail me the results. If it's interactive, I want it to print > the output to the screen. > > Any ideas? > actually, just have the program output to the screen since crontab will automatically E-mail any stdout of the program to you anyway. Try it. -------------------------------------------------------------------------- Frank Li Assistant System Admin (Finally !) E-mail(work) fli@austin.dsccc.com E-mail(personal) prefect@ccwf.cc.utexas.edu What I say is what I think, and no one else's (including the company) --------------------------------------------------------------------------