MacOS – Mac mail mail from cron

bashcronemailmacos

From sandeep@Sandeeps-MacBook-Air.local  Fri Mar 23 20:04:23 2018
X-Original-To: sandeep
Delivered-To: sandeep@Sandeeps-MacBook-Air.local
From: sandeep@Sandeeps-MacBook-Air.local (Cron Daemon)
To: sandeep@Sandeeps-MacBook-Air.local
Subject: Cron <sandeep@Sandeeps-MacBook-Air> /Users/sandeep/Library/cootie.pl/cootie.pl cr
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=sandeep>
X-Cron-Env: <USER=sandeep>
X-Cron-Env: <HOME=/Users/sandeep>
Date: Fri, 23 Mar 2018 20:04:22 +0530 (IST)

/bin/sh: /tmp/iu.sh: No such file or directory

I'm getting this mail quite often. What is this about? Is my Mac ok? Do I need to update something or delete anything?

$ crontab -l
4 * * * * /Users/sandeep/Library/cootie.pl/cootie.pl cr

Best Answer

You get mail from cron whenever a cron command fails. In such cases you can use

crontab -l

to see which commands cron executes. From there you have two options

  • Run EDITOR=nano crontab -e to edit your crontab and remove the offending line
  • Fix the error in the script (/Users/sandeep/Library/cootie.pl/cootie.pl in your case)