Sorry Matt. You're right, it is complicated. Maybe I need to approach it a different way.
Essentially my situation is that my partner and myself do shift work and are our schedules are very different. I have our rosters in iCal in separate calendars. I have an Applescript that checks the calendars each night to work out if someone is working dayshift, or nightshift (and have corresponding Indigo variables). Reason being that if one of us has worked nightshift, I test those variables, to quarantine launching certain actions (e.g. music/sound, opening curtains, etc) in case we are sleeping.
I do have a 'sleep' mode, but the spouse is reluctant to use it (in fact, spousal resistance is very high to any automation), and more likely, being tired after 14-hour night shift, last thing you want to think about is having to turn everything off (even if it is only 1 button on the bedroom wall
).
The reason its on a remote machine is my calendars are on my office iMac and not on my server. The script is executed on the iMac nightly and updates IndigoServer. I find it easier to deal with iCal scripting locally. Remote scripting is not easy for me. I suppose I could subscribe to the calendars on the server and update locally, but I was trying to keep my server as 'light' as possible. The cron entry merely launches the Applescript.
I hope that all makes sense. Thanks again. Greg.