You should be able to use a cron job to restart the box.
But if it's an important server or anything along the lines why don't you try and narrow down the "consciousness" problem is there a process that needs to be stopped\started or do you have underlying hardware problems or even your power config is incorrect, having a machine restart itself can be usefull but also in my experience can lead to bigger problems (like the server not comming up).
But anyhow to create a cronjob using crontab do the following:
crontab -e #this will put you into a session with your default editor (vi \ nano)
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
MAILTO=(email address)
0 0 1,15 * * shutdown -r now # midnight on the 1st and the 15th of each month
save the file and your done,
Try this website (it has an autocrontab generator):
http://htmlbasix.com/crontab.shtml
But it's a useful tool and you would probably want to read up on it:
http://kb.indiana.edu/data/afiz.html