You can try sendmail to send a message. A script might be simply something like this:
Code:
#!/bin/bash
(
echo "From: Me <me@domain.com>"
echo "To: You <you@domain.com>"
echo "Subject: Testing mail from crontab"
echo
echo "This is a mail automatically sent at $(date)"
echo
top -b -n1
) | /usr/sbin/sendmail you@domain.com
The parentheses serve to group the echo and the top statement together (this equals to execute a subshell). To run it automatically every 15 minutes, first give execution permissions to the script:
Code:
chmod +x /path/to/script.sh
then edit the user's crontab by means of
and finally create your cron job:
Code:
0,15,30,45 * * * * /path/to/script.sh
Useful man pages to check:
Code:
man top
man crontab
man 5 crontab
The parts in grey must match your real situation (e-mail addresses, path and name of the script and so on). Hope this helps.