Axarva / dotfiles-2.0

XMonad™️. Widgets go brr.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cron for getquotes and getweather sending me mails - maybe redirect them to /dev/null

redglobuli opened this issue · comments

Hi,

i keep getting 'You have new mail.' messages, maybe add > /dev/null 2>&1 to the readme.

You have new mail? I have never heard of this happening. Could you post a screenshot?

i can show you the mail i get from cron. i think it's because there is output by the script it gets mailed via cron.

1 From user@localhost.localdomain Fri Jul 23 11:34:02 2021
2 Return-Path: user@localhost.localdomain
3 X-Original-To: user
4 Delivered-To: user@localhost.localdomain
5 Received: by localhost.localdomain (Postfix, from userid 1000)
6 id 7B5623760166; Fri, 23 Jul 2021 11:34:02 +0200 (CEST)
7 From: "(Cron Daemon)"user@localhost.localdomain
8 To: user@localhost.localdomain
9 Subject: Cron user@localhost /home/user/.config/eww/scripts/getweather
10 MIME-Version: 1.0
11 Content-Type: text/plain; charset=UTF-8
12 Content-Transfer-Encoding: 8bit
13 Auto-Submitted: auto-generated
14 Precedence: bulk
15 X-Cron-Env: <LANG=us_US.UTF-8>
16 X-Cron-Env: <SHELL=/bin/sh>
17 X-Cron-Env: <HOME=/home/user>
18 X-Cron-Env: <PATH=/usr/bin:/bin>
19 X-Cron-Env: <LOGNAME=user>
20 X-Cron-Env: <USER=user>
21 Message-Id: 20210723093402.7B5623760166@localhost.localdomain
22 Date: Fri, 23 Jul 2021 11:34:02 +0200 (CEST)
23
24 {"coord":{"lon"::type":1 --- stripped the rest

also got one from stderr on reboot:

rm: cannot remove '/tmp/xmonad/quotes/quote-tail': No such file or directory

it's no big deal, just wanted to mention it.

This is actually cron's default behavior as far as I know. It will send you mail about how the scripts it was supposed to execute worked or failed. My machine has no mail or mail reader so I couldn't detect this. I'd just leave it be if I were you. You could look up for workarounds. Since this isn't strictly an issue, I'll be closing this.