Acrobat Distiller - check for running jobs /stop and restart

Hi all-
I need a basic script to check a distiller and quit it when its stuck. Please help :slight_smile:
Something like this:

tell application “Acrobat Distiller”
If jobs are running
Has jobXXX been running for over 10minutes?
if yes then quit the distiller
tell application “Acrobat Distiller”
to activate

… exit this script

if jobs are not running (do a quick quit and relaunch to clean things up)
tell application “Acrobat Distiller”
tell application “Acrobat Distiller” to quit
end tell

tell application “Acrobat Distiller”
to activate

What’s happening when Distiller gets “stuck”? Is the application hung? WIll it still respond to events?

The application is running, but it stops processing jobs.

Will Acrobat respond to events when it’s in this state? If so, you’ll be able to quit it. If not, you’ll need to do a do shell script kill.