You may be wondering, if there is an error in a crontab file how does the computer report it? It does this by using the sendmail system, to mail the crontab user.
The following is an example of how errors are reported by cron:
Open a terminal with a user account.
Edit your crontab file by running the following command:
crontab -e
Now let's deliberately cause an error. Scroll to the bottom and add the following line:
* * * * date > /baddirectory/date.txt
Save the file. Wait until cron runs in the next minute, and then press Enter in your user terminal.
You should see a message saying you have mail. Run the following command:
mail
There should be a mail indicating the error (in this case, file not found). You may delete the message by pressing D and then Q to leave the mail.
To finish, be sure to re-edit your crontab file and remove the bad line we just added.