one-liner for having cron send exactly one mail

Sometimes things that run like clockwor does not when running via cron.

Especially, mails from cron tend not to work.

In hunting another such ghost problem, I optimized my 2-liner blocking the shell 60 seconds to a non-blocking one-liner:

echo '* * * * * root /bin/echo "test from cron" && rm /etc/cron.d/mailtest' >/etc/cron.d/mailtest


From: IBCL BLog.
Originally posted: 2009-02-06