Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: interactive vs cron called



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@xxxxxxxxxxxxxxxx
E-mail(personal) prefect@xxxxxxxxxxxxxxxxxx
What I say is what I think, and no one else's (including the company)
--------------------------------------------------------------------------



Messages sorted by: Reverse Date, Date, Thread, Author