Thanks to everyone for your help.
@MrHoffman
I will definitely be looking into using launchd in the future.
@Linc Davis, BobHarris, Camelot
As suggested, I have put the commands into a script that I invoke from cron. Mail is now being sent locally from cron detailing further issues which I suspect are related to BobHarris' point about the cron environment being different. Here is an example of the email:
USERNAME@imac:~$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/USERNAME": 2 messages 2 new
>N 1 USERNAME@imac.local Tue Jan 3 10:53 22/859 "Cron <USERNAME@imac> /Users/USERNAME/Desktop/"
N 2 USERNAME@imac.local Tue Jan 3 10:54 19/703 "Cron <USERNAME@imac> /Users/USERNAME/Desktop/"
? t 1
Message 1:
From USERNAME@imac.local Tue Jan 3 10:53:08 2012
X-Original-To: USERNAME
Delivered-To: USERNAME@imac.local
From: USERNAME@imac.local (Cron Daemon)
To: USERNAME@imac.local
Subject: Cron <USERNAME@imac> /Users/USERNAME/Desktop/MonitorSite/checksite.sh
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=USERNAME>
X-Cron-Env: <USER=USERNAME>
X-Cron-Env: <HOME=/Users/USERNAME>
Date: Tue, 3 Jan 2012 10:53:00 -0600 (CST)
/Users/USERNAME/Desktop/MonitorSite/checksite.sh: line 4: md5: command not found
Files - and old differ
send-mail: authentication method PLAIN needs a password
send-mail: could not send mail (account default from /usr/local/etc/msmtprc)
Here is what my script looks like:
#! /bin/sh
cd /Users/USERNAME/Desktop/MonitorSite/
curl -s http://www.example.com | md5 | tee new - | diff -q - old || echo 'A change was detected on Example.com' | mail -s 'Example.com has changed' my.email@gmail.com && mv new old
Lastly, here is the output from running the cron script that BobHarris suggested:
USERNAME@imac:~$ cat /tmp/cron.env.txt
/Users/USERNAME
uid=501(USERNAME) gid=20(staff) groups=20(staff),401(com.apple.access_screensharing),12(everyone),33(_appstore),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),100(_lpoperator),204(_developer),403(com.apple.sharepoint.group.2),402(com.apple.sharepoint.group.1)
0
SHELL=/bin/sh
USER=USERNAME
PATH=/usr/bin:/bin
PWD=/Users/USERNAME
HOME=/Users/USERNAME
SHLVL=2
LOGNAME=USERNAME
_=/usr/bin/printenv
Thanks again for the help.