πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.gnus
Article #913

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

#913
From: W. Greenhouse
Date: Wed, 20 Feb 2013 16:39
23 lines
3062 bytes
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.

-- 
GnuPG/PGP key: subkeys.gnupg.net 0D2D3F9E
Technical Details
Message-ID: <mailman.20455.1361379906.855.info-gnus-english@gnu.org>
Path: arc1-ca.pugleaf.net!jm3ni10671pbb.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!usenet.stanford.edu!not-for-mail
References: <87liarooj7.fsf@free.fr>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1016f0,c483693d7afdde38,start
X-Google-NewGroupId: yes
X-Google-Attributes: gid99bd902dcd,domainid0,public,usenet
X-Google-Language: ENGLISH,UTF8
X-Received: by 10.66.76.201 with SMTP id m9mr2704428paw.33.1361379907393;
        Wed, 20 Feb 2013 09:05:07 -0800 (PST)
Path: arc1-ca.pugleaf.net!jm3ni10671pbb.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!usenet.stanford.edu!not-for-mail
From: wgreenhouse@riseup.net (W. Greenhouse)
Newsgroups: gnu.emacs.gnus
Subject: Re: gnus-agent-fetch in batch mode in a cron job
Date: Wed, 20 Feb 2013 16:39:01 +0000
Lines: 25
Approved: info-gnus-english@gnu.org
Message-ID: <mailman.20455.1361379906.855.info-gnus-english@gnu.org>
References: <87liarooj7.fsf@free.fr>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
X-Trace: usenet.stanford.edu 1361379907 13397 208.118.235.17 (20 Feb 2013 17:05:07 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: tor21.anonymizer.ccc.de
X-Archive: encrypt
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)
Cancel-Lock: sha1:bjqT4RgFf8uDfzlmrvPYfvNKKww=
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>
X-Received-Bytes: 2682
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit