Re: user crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-05-07 06:00, Robert Moskowitz wrote:
> I know I can edit the user crontab with:
>
> crontab -e
>
> and display it with
>
> crontab -l
>
> But where is it?  I don't see anything like ~/.crontab
>
> Secondly, and more importantly, is getting a email from the user crontab.  I have in my crontab:
>
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=rgm
>
>
> And nothing gets mailed to /var/spool/mail/rgm
>
> ls /var/spool/mail/ -ls
> total 0
> 0 -rw-rw----. 1 rgm mail 0 May  5 17:21 rgm
> 0 -rw-rw----. 1 rpc mail 0 May  5 17:07 rpc
>
>
> Do I need something like postfix with a minimal installation to get the output from my crontab?
>

Sorry to be "late to the party".

I did the following....

dnf install postfix
systemctl --now enable postfix

My crontab....

SHELL=/bin/sh
MAILTO=egreshko
37 * * * * /home/egreshko/bin/tippy

Contents of /home/egreshko/bin/tippy

[egreshko@f31k ~]$ cat bin/tippy
#!/bin/sh

echo HI

ls /tmp

And then you can see the time has past with...

[egreshko@f31k ~]$ date
Mon 11 May 2020 11:38:01 AM CST

And this showed up in local mailbox

[egreshko@f31k ~]$ cat /var/spool/mail/egreshko
>From egreshko@xxxxxxxxxxxxxxxx  Mon May 11 11:37:01 2020
Return-Path: <egreshko@xxxxxxxxxxxxxxxx>
X-Original-To: egreshko
Delivered-To: egreshko@xxxxxxxxxxxxxxxx
Received: by f31k.greshko.com (Postfix, from userid 1026)
        id 61824A7C95; Mon, 11 May 2020 11:37:01 +0800 (CST)
From: "(Cron Daemon)" <egreshko@xxxxxxxxxxxxxxxx>
To: egreshko@xxxxxxxxxxxxxxxx
Subject: Cron <egreshko@f31k> /home/egreshko/bin/tippy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=34>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/1026>
X-Cron-Env: <DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1026/bus>
X-Cron-Env: <XDG_SESSION_TYPE=unspecified>
X-Cron-Env: <XDG_SESSION_CLASS=background>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <MAILTO=egreshko>
X-Cron-Env: <HOME=/home/egreshko>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=egreshko>
X-Cron-Env: <USER=egreshko>
Message-Id: <20200511033701.61824A7C95@xxxxxxxxxxxxxxxx>
Date: Mon, 11 May 2020 11:37:01 +0800 (CST)

HI
sddm-:0-WDrvkF
sddm-auth43c5c6d5-ceb7-4e5b-b09f-abe5c864fba1
systemd-private-a3fcb3cdd0024b53828446634851314a-chronyd.service-5olExh
systemd-private-a3fcb3cdd0024b53828446634851314a-colord.service-759pOi
systemd-private-a3fcb3cdd0024b53828446634851314a-dbus-broker.service-2c7ROg
systemd-private-a3fcb3cdd0024b53828446634851314a-ModemManager.service-e8g5zi
systemd-private-a3fcb3cdd0024b53828446634851314a-postfix.service-tkOnQf
systemd-private-a3fcb3cdd0024b53828446634851314a-rtkit-daemon.service-vXKr2h
systemd-private-a3fcb3cdd0024b53828446634851314a-systemd-logind.service-jmYKHf
systemd-private-a3fcb3cdd0024b53828446634851314a-upower.service-24SETg


Isn't that what you wanted?


-- 
The key to getting good answers is to ask good questions.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux