scrot is a very decent tool which as far as I know is linux only, not sure if port/clone exists.
Other than that look at this for example:
http://docs.oracle.com/javase/6/docs/api/java/awt/Robot.html#createScreenCapture%28java.awt.Rectangle%29I am not sure what your purpose is but something like that can be written in minutes, probably stealthier (if that is of any importance).
If your tool doesnt write away the file when sheduled you are probably fucking something up.
One way to catch it is to run it in a BASH/PS file and pipe the output to a text document.
Probably permission .. its always freaking permissions
God I hate that britney spears avatar thingy.