Well some folks updated my cronjob package, but made a small error. The sql was removed from the tcl/cronjob-procs.tcl file and put into an xql file, but the $sql variable was left in place, explaining the error.
I fixed it and committed the changes to cvs. I also fixed another bug that didn't allow the day-of-week to display correctly on the cronjob page.
I'm not exactly sure how you can checkout just the changes, but if you used cvs to get the original version, just do a cvs update in the cronjob package directory should work.
Otherwise I can try to package it and mail it to you.
Your other question was: what does the sql part do.
The sql you put in that box will be executed. The result will be formatted as a table with the column headings set to the select column names. If you include an email address, the result html table will be emailed to that address. This is great for running reports at a given time and emailing it to your local manager type. Then the tcl script will be run. Leaving out the sql part has no effect on the tcl script part. If you wanted an email from what the tcl script did, you would have to include a call to ns_sendmail, or something similar, in the tcl script.