From: Sweth Chandramouli <sweth@astaroth.nit.gwu.edu>
To: zsh-users@math.gatech.edu
Subject: Re: interactive vs cron called
Date: Thu, 18 Dec 1997 16:05:03 -0500 [thread overview]
Message-ID: <19971218160503.63049@astaroth.nit.gwu.edu> (raw)
On Thu, Dec 18, 1997 at 03:30:51PM -0500, 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.
why not just have it print output to screen, and in the crontab run the
command through a pipe to a command-line mailer?
alternately, write your script to accept a command line option to send
you mail, and invoke the cron using that option.
-- sweth.
--
"Countin' on a remedy I've counted on before
Goin' with a cure that's never failed me
What you call the disease
I call the remedy" -- The Mighty Mighty Bosstones
next reply other threads:[~1997-12-18 21:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-12-18 21:05 Sweth Chandramouli [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-12-19 9:14 John Riddoch
1997-12-18 20:30 Jason Zapman II
1997-12-18 21:11 ` Frank Li
1997-12-18 21:47 ` Jason Zapman II
1997-12-19 1:44 ` Danek Duvall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19971218160503.63049@astaroth.nit.gwu.edu \
--to=sweth@astaroth.nit.gwu.edu \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).