View unanswered posts | View active topics It is currently Tue Sep 07, 2010 5:25 pm



Reply to topic  [ 5 posts ] 
 General Q's on Startup Scripts 
Author Message

Joined: Nov 26, 2009
Posts: 177
Location: Kalispell, MT
Post General Q's on Startup Scripts
Hey,

I'm a bit unclear on the difference between a script that's executed
by a trigger in Indigo and one that's executed when the Indigo server starts
such as the NOAA weather script. I assume that the type that
executes on server startup continues to run on it's own
and doesn't need to be triggered after it's loaded?

One reason I ask is that I have the NOAA script setup to execute on startup
but it rarely updates any info unless I manually execute it, or trigger it some other way.

I'd really like to get the SLIMP3 script going to control my Squeezebox Radio but
would welcome any info on getting it setup correctly in terms of how to properly
execute it, and send the commands.

Thanks,

Carl


Sun Mar 28, 2010 7:46 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 2554
Location: Austin, Texas
Post Re: General Q's on Startup Scripts
The difference is in how the script is constructed. Some run forever in a loop - the NOAA script is like that - and those you want to start only one time. Other scripts do a task and quit and those you have to start every time.

As a general rule among the scripts that ship with Indigo, the ones in the Background Scripts folder run forever and only need to be started once. The ones in the Attachments folder mostly should never need to be started (because they provide handlers, although some 3rd party scripts provide both handlers and execution parts).

Don't know why the NOAA script isn't running for you - are you sure you're starting up the version that shipped with Indigo?

_________________
Jay (Indigo Support)
Image


Mon Mar 29, 2010 7:15 am
Profile WWW

Joined: Nov 26, 2009
Posts: 177
Location: Kalispell, MT
Post Re: General Q's on Startup Scripts
Thanks Jay. Yep, I'm running the standard NOAA script. On a fresh boot it seems to work fine.

Are the scripts actually running within Indigo or at a system level so quitting
Indigo may not disable them?

I ask because I see they can be executed from the script editor as well.

Carl


Mon Mar 29, 2010 9:42 am
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 2554
Location: Austin, Texas
Post Re: General Q's on Startup Scripts
External scripts run by Indigo are started by using the "/usr/bin/osascript" system application - that creates a separate process from the IndigoServer process. Indigo remembers which scripts it launched in this fashion and if they are still running at server shutdown it attempts to stop them (if they get in a bad state it's possible that Indigo won't be able to kill the process however). If you run them inside Script Editor, they'll run forever.

_________________
Jay (Indigo Support)
Image


Tue Mar 30, 2010 5:21 pm
Profile WWW

Joined: Nov 26, 2009
Posts: 177
Location: Kalispell, MT
Post Re: General Q's on Startup Scripts
Thanks Jay, good to know.

Carl


Wed Mar 31, 2010 9:20 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: Ask Jeeves [Bot], Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.