I have a script that I want to run every hour, and the echo
's of that script and other output, I want to be able to read.
Now when I take a look at /var/log/syslog
, I see some weird stuff that I can't explain. Please see below.
Would anyone know what my issue is?
Apr 29 22:52:01 raspberrypi cron[408]: (pi) RELOAD (crontabs/pi)
Apr 29 22:52:01 raspberrypi CRON[8189]: (pi) CMD (/home/pi/Projects/test-cron.sh)
Apr 29 22:52:01 raspberrypi cron[408]: 2022-04-29 22:52:01 1nkXar-000288-H2 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=119
Apr 29 22:52:01 raspberrypi cron[408]: 2022-04-29 22:52:01 1nkXar-000288-H2 <= pi@raspberrypi U=pi P=local S=575
Apr 29 22:52:01 raspberrypi cron[408]: 2022-04-29 22:52:01 1nkXar-000288-H2 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=119
Apr 29 22:52:01 raspberrypi cron[408]: exim: could not open panic log - aborting: see message(s) above
Apr 29 22:52:01 raspberrypi exim[8192]: 2022-04-29 22:52:01 1nkXar-000288-H2 <= pi@raspberrypi U=pi P=local S=575
Apr 29 22:52:01 raspberrypi exim[8192]: 2022-04-29 22:52:01 1nkXar-000288-H2 Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=119
Apr 29 22:52:01 raspberrypi exim[8192]: exim: could not open panic log - aborting: see message(s) above
Apr 29 22:52:01 raspberrypi CRON[8188]: (pi) MAIL (mailed 6 bytes of output but got status 0x0001 from MTA#012)
I have no idea what exim4 is, I never installed this. I just wanna see some logs from my cron jobs.
More information about my setup:
crontab -e
# Thanks to https://linuxhint.com/check_working_crontab/
# I know this is not every hour; this is just an example to make the job run frequently!
* * * * * /home/pi/Projects/test-cron.sh
ls -la in /home/pi/Projects
drwxr-xr-x 5 pi pi 4096 Apr 29 22:42 .
drwxr-xr-x 25 pi pi 4096 Apr 29 01:24 ..
-rwxr-xr-x 1 pi pi 13 Apr 29 22:39 test-cron.sh
test-cron.sh
echo "TESTING CRONJOBS!"
Now, I would expect if I did something like cat /var/log/syslog | grep "TESTING CRONJOBS!"
, I would see the results... But I don't!