timeout while executing a shell script

I have a command to execute that will take a long time to run to completion. I’m executing it with do shell script which seems to time out while waiting. How can i get rid of this limitation?

You can tell it how long to wait for a timeout (in seconds):


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

thanks jon! that should give it enough time…

Hmmm… I’m not absolutelly sure, but I’d say that “do shell script” won’t cause a timeout error, unless it is within a tell block. So, you can use Jon’s “timeout” statement or simply move the “do shell script” call out of the tell block (guessing…)

Does your AppleScript need to wait for the shell script to complete before continuing?

If not you can just background the shell command so that it runs independent of your script and your script can continue processing.

To do this, append " > /dev/null 2>&1 &" to the command. This standard shell syntax suppresses command output and runs the command in the background.

actually, the script does need to wait for the shell command to complete before moving on. The shell command issued is to install a package from a directory. If i execute eight in a row of these, i’ll kill my processing power!