If the script works fine, then your syntax for the cron job would be incorrect.. how did you add it, and what did you type?
crontab -e will bring up the crontab file associated with the username that invoked it. Here is the syntax (copied from my crontab file)
Code:
# Minute Hour Day Month DayOfWeek Command
# sample:
05 13 * * Mon /usr/bin/updatedb
This would run /usr/bin/updatedb at 1:05 PM every monday of the year. So to have your script run every 12 hours the syntax might look something like this:
Code:
00 00 * * * cd /path/to/folder/ && sh yourScript.sh
00 12 * * * cd /path/to/folder/ && sh yourScript.sh