Script to be activated if web page changes
Save this as ~/bin/example and run chmod +x ~/bin/example. (Edited to only check the modification date from the header.)

#!/bin/bash

url=http://www.iana.org/domains/example
tempdir=~/Library/Caches/scripts
temp=$tempdir/example
mkdir -p $tempdir
modified=$(curl -sI "$url" | grep ^Last-Modified)
if [[ -f "$temp" &amp;&amp; "$modified" != "$(cat $temp)" ]]; then
    terminal-notifier -message 'Example changed'
fi
printf %s "$modified" &gt; $temp


To run it every 15 minutes, add */15 * * * * ~/bin/example to crontab (EDITOR=nano crontab -e).

terminal-notifier can be installed with sudo gem install terminal-notifier.

You could also run it every five seconds in a shell window:

while :; do ~/bin/example; sleep 5; done