A little help on how to wire SQW pin of DS3231

The pin you connect it to also has to be able to trigger an interrupt.

Depending upon the board your using this page from the Reference manual will help you identify pins that can trigger an interrupt.

http://arduino.cc/en/Reference/AttachInterrupt