Hi Dave,
I can tell you about an alert i set up on my system.
It's a script (cmd script) that work this way :
1- Execute a sql request to count the number of waiting ube, with a threshold, spooled to a text file
2 - launch a second cmd script that analyse (using FIND command) the result of the request to find a particular string
3 - if the string is found, execute a second sql request to get the list of waiting ube (user, queue, name, ...) spooled to a txt file
4 - execute a third cmd script to send the result by email the result of this request using the little, but great and usefull program "BLAT" (a simple exe file to copy on the machine where is executed the script).
I'm preparing a text with the details of thoses script if you want.