BillC wrote:Right. You can test it by killing the process. enter: ps ax|grep PhoneValet in the terminal. The process ID (PID) will be in column 1. Then just do: kill <PID>. For example: kill 1527That worked as well. I assume the log (and the results/events in script editor) will be empty until the target script dies?
set cmdOut to do shell script "/Library/Application Support/Perceptive Automation/Test/testscpt-watcher.sh &"
log cmdOut
berkinet wrote:Then look in your Indigo log to see what was recorded. Maybe there will be a hint there.
2009-11-08 16:34:56 Script
#!/bin/sh
while [ true ]
do
echo "Script Started"
/usr/bin/osascript "/Library/Application Support/Perceptive Automation/Test/PhoneValet Background Script.scpt"
echo "Script Finished"
EXCODE=$?
DATE='date'
/usr/bin/osascript "/Library/Application Support/Perceptive Automation/Test/indigoLogger.scpt PhoneValet Background Script.scpt $EXCODE"
done
exit 0
berkinet wrote:Well. Try this. Add a line to the shell script so that it produces some output when it runs...You should then see "Script Started" and maybe "Script Ended" in your out.log file. That will let you know you at least got to the line above where the PhoneValet script is run.
- Code: Select all
#!/bin/sh
while [ true ]
do
echo "Script Started"
/usr/bin/osascript "/Library/Application Support/Perceptive Automation/Test/PhoneValet Background Script.scpt"
echo "Script Finished"
EXCODE=$?
DATE='date'
/usr/bin/osascript "/Library/Application Support/Perceptive Automation/Test/indigoLogger.scpt PhoneValet Background Script.scpt $EXCODE"
done
exit 0
If you try this, remove the "set cmdOut" to from the AS command line, also remove the log cmdOut. If you don't remove the set, Indigo will hang waiting for output.
JeffS wrote:Jay-
I'm the one that started the whole PhoneValet variables not updating thing...
This morning, I happened to notice the following in the Indigo Event Log:
Nov 11, 2009 5:40:09 AM
Error script error: in file "PhoneValet Attachments.scpt"
Error script error: PhoneValet got an error: AppleEvent timed out. (-1712)
Error error dispatching event to attachment script (-1753)
So I performed the "ps" command, and the script had stopped.
Hopefully this tells you something.
Take care!
Jeff
JeffS wrote:Jay-
The full results for the "ps" command:
Jeff$ ps -axwww | grep Indigo
144 ?? 1:49.62 /Library/Application Support/Perceptive Automation/Indigo 4/IndigoServer.app/Contents/MacOS/IndigoServer
153 ?? 3:48.21 /Applications/Indigo 4.app/Contents/MacOS/Indigo 4 -psn_0_57358
173 ?? 1:30.56 python /Library/Application Support/Perceptive Automation/Indigo 4/IndigoWebServer/IndigoWebServer.py -i1176 -w8176 -cfn
174 ?? 0:55.67 python /Library/Application Support/Perceptive Automation/Indigo 4/IndigoSqlClient/IndigoSqlClient.py -i1176
13488 ttys000 0:00.00 grep Indigo
PhoneValet is running, and taking calls. I could do a full restart and show you the results again if it would help.
Jeff
2009-12-28 19:41:01 Background Script Script PhoneValetBackgroundScript.scpt died with exit code 0 and was restarted
2009-12-28 19:41:01 Script PhoneValet Background Script started
BillC wrote:I finally got around to getting berkinet's scripts to work, and captured the error code when the PhoneValet script died. I don't think it's going to help much..."0" is a normal exit....at least his coding provides a way to automatically restart the background scripts.
- Code: Select all
2009-12-28 19:41:01 Background Script Script PhoneValetBackgroundScript.scpt died with exit code 0 and was restarted
2009-12-28 19:41:01 Script PhoneValet Background Script started
Mar 9, 2010 9:39:12 AM
PhoneValet New voicemail from: XXXXXX
Background Script Script PhoneValetBackgroundScript.scpt died with exit code 0 and was restarted
Script PhoneValet Background Script started
Mar 9, 2010 9:39:35 AM
Background Script Script PhoneValetBackgroundScript.scpt died with exit code 0 and was restarted
Script PhoneValet Background Script started
Mar 9, 2010 9:39:56 AM
Background Script Script PhoneValetBackgroundScript.scpt died with exit code 0 and was restarted
Script PhoneValet Background Script started
Mar 9, 2010 9:40:17 AM /same entries/
Mar 9, 2010 9:40:38 AM /same entries/
Mar 9, 2010 9:40:59 AM /same entries/
Mar 9, 2010 9:41:20 AM /same entries/
Mar 9, 2010 9:41:41 AM /same entries/
Mar 9, 2010 9:42:01 AM /same entries/
Mar 9, 2010 9:42:22 AM /same entries/
Mar 9, 2010 9:42:44 AM /same entries/
Mar 9, 2010 9:43:05 AM /same entries/
Mar 9, 2010 9:43:26 AM /same entries/
Mar 9, 2010 9:43:47 AM /same entries/
tell application "Play Sound" to play (alias alertSound) repeat (theNewCallCount - 1) at volume alertSoundVolume
tell application "Play Sound" to play (alertSound) repeat (theNewCallCount) - 1 at volume alertSoundVolume
Users browsing this forum: No registered users and 3 guests