Lubuntu 24.04 LTS Minimal (no snaps)
Either I’m reading the wrong stuff, reading stuff wrong, or I need to make some changes.
Most likely all of the above.
Please help me with this.
Using claws-mail to view emails from cron.
I want both stdout and stderr.
So far nothing yet, even after changing the minute, hour and target directory in the crontab entry.
The script needs sudo
Owner is wyatt
Permissions are set to
chmod a+x
sudo crontab entry is
43 11 * * * /home/wyatt/Desktop/System-Reports.sh 2>/home/wyatt/mail
The script currently is on the Desktop and looks like this…
#!/bin/bash
# Create the directory where system reports go into
mkdir /home/wyatt/Desktop/System-Reports
journalctl -p emerg -b > /home/wyatt/Desktop/System-Reports/Jctl_emerg.txt
journalctl -p alert -b > /home/wyatt/Desktop/System-Reports/Jctl_alert.txt
journalctl -p crit -b > /home/wyatt/Desktop/System-Reports/Jctl_crit.txt
journalctl -p err -b > /home/wyatt/Desktop/System-Reports/Jctl_err.txt
journalctl -p warning -b > /home/wyatt/Desktop/System-Reports/Jctl_warning.txt
journalctl -p notice -b > /home/wyatt/Desktop/System-Reports/Jctl_notice.txt
journalctl -p info -b > /home/wyatt/Desktop/System-Reports/Jctl_info.txt
journalctl -p debug -b > /home/wyatt/Desktop/System-Reports/Jctl_debug.txt
# /home/wyatt/.xsession-errors
# Check and Review log files
grep -Ei 'warn|error' /var/log/*g > /home/wyatt/Desktop/System-Reports/Log-Warnings-Errors.txt
grep -Ei 'warn|error|emerg|alert|crit|noti|info|debug|fail' /var/log/*g > /home/wyatt/Desktop/System-Reports/Log-All.txt
grep -Ei 'warn|error|emerg|alert|crit|noti|info|debug|fail' /var/log/dmesg > /home/wyatt/Desktop/System-Reports/DMesg-Reports.txt
# Check and Review dmesg log
tac /var/log/dmesg > /home/wyatt/Desktop/System-Reports/DMesg-Logfile.txt