OP, at the top of my crontab, just before any jobs, I have these comments to remind me of the cron format, followed by the MAILTO variable setting. As good practice, all cron variables should be set before any cron job definitions.
# min hrs dayofmonth month dayofweek command
# dow = 0-6 where 0 is Sunday, 6=Saturday
So in my case,
chuck is a user local to the machine cron is running on. If you have a full Mail Transfer Agent set up, you can set MAILTO to a full email address:
All cron output is sent to the user in the MAILTO variable.
Be careful, as I have gotten "blank" emails from cron which weren't really blank. It captured a carriage return output to STDOUT! That was a PITA to track down as I could not find a way for my Ubuntu mail reader (alpine) to show hidden characters. (It's a good idea to have a mail reader that shows hidden ctrs.)
As an alternative to test a job batch/shell file, you can use
at TIMESPEC followed by one command per line, then ^D at the end of the command list. However this will not let you know if your cron variables are set up correctly, but you will still get an email (to the current local user that ran the
at job) when the
at job is complete.
at now + 1 minute<ENTER>