🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.gnus
Article #916

Re: gnus-agent-fetch in batch mode in a cron job

#916
From: Julien Cubizolles
Date: Fri, 22 Feb 2013 06:10
27 lines
3490 bytes
wgreenhouse@riseup.net (W. Greenhouse)
writes:

> Hi Julien,
>
> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
>> The subject says it all. I'm fetching news through emacs in batch mode
>> in a cron job but I can't figure out how to get the possible errors
>> through the mails sent by cron.
>>
>> In batch mode emacs output everything that should go to the *Messages*
>> buffer to stderr so cron sends an email each time the job is run, even
>> without any error. I don't want to receive an email when there is no
>> problem. Is there a way to get emacs to send only the error messages to
>> stderr ?
>>
>> Julien.
>
> Yes, this should be a matter of shell redirection.  Cron actually sends
> both stdout and stderr to email, so if you only want stderr, then you
> should redirect stdout to /dev/null.  There isn't a -quiet option or
> similar for Emacs in batch mode, so it's all up to the shell.

>From what I understand Emacs outputs the whole *Messages* buffer to
stdout. So there is nothing the shell can do to sort error messages from
information messages. Is that right ?
Technical Details
Message-ID: <mailman.20575.1361513992.855.info-gnus-english@gnu.org>
Path: arc1-ca.pugleaf.net!jm3ni25235pbb.0!nntp.google.com!border1.nntp.dca.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.thorslund.org!news.jacob-sparre.dk!hugin.jacob-sparre.dk!nuzba.szn.dk!pnx.dk!zen.net.uk!dedekind.zen.co.uk!feeder.erje.net!us.feeder.erje.net!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!not-for-mail
References: <87liarooj7.fsf@free.fr> <878v6jszx6.fsf@riseup.net>

Show Full Headers
Complete Article Headers
X-Google-Thread: 99bd902dcd,c483693d7afdde38,start
X-Google-Attributes: gid99bd902dcd,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: ENGLISH,UTF8
X-Received: by 10.66.253.10 with SMTP id zw10mr1471069pac.4.1362070864814;
        Thu, 28 Feb 2013 09:01:04 -0800 (PST)
Path: arc1-ca.pugleaf.net!jm3ni25235pbb.0!nntp.google.com!border1.nntp.dca.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.thorslund.org!news.jacob-sparre.dk!hugin.jacob-sparre.dk!nuzba.szn.dk!pnx.dk!zen.net.uk!dedekind.zen.co.uk!feeder.erje.net!us.feeder.erje.net!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!not-for-mail
From: Julien Cubizolles <j.cubizolles@free.fr>
Newsgroups: gnu.emacs.gnus
Subject: Re: gnus-agent-fetch in batch mode in a cron job
Date: Fri, 22 Feb 2013 07:10:52 +0100
Lines: 29
Approved: info-gnus-english@gnu.org
Message-ID: <mailman.20575.1361513992.855.info-gnus-english@gnu.org>
References: <87liarooj7.fsf@free.fr> <878v6jszx6.fsf@riseup.net>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
X-Trace: usenet.stanford.edu 1361513992 716 208.118.235.17 (22 Feb 2013 06:19:52 GMT)
X-Complaints-To: action@cs.stanford.edu
To: info-gnus-english@gnu.org
Envelope-to: info-gnus-english@gnu.org
X-Injected-Via-Gmane: http://gmane.org/
X-Gmane-NNTP-Posting-Host: 37.160.36.58
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
Cancel-Lock: sha1:gkBFHlQSxdGtH0sPwiIg1tAejXQ=
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 80.91.229.3
X-BeenThere: info-gnus-english@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Announcements and discussions for GNUS,
 the GNU Emacs Usenet newsreader \(in English\)"
 <info-gnus-english.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/info-gnus-english>,
 <mailto:info-gnus-english-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/info-gnus-english>
List-Post: <mailto:info-gnus-english@gnu.org>
List-Help: <mailto:info-gnus-english-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/info-gnus-english>,
 <mailto:info-gnus-english-request@gnu.org?subject=subscribe>
Bytes: 3118
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit