How do I open an application on a daily repeat basis?

Hi folks,

A few days ago, I bought the excellent iSynCal, which synchronises several copies of iCal with each other (and with any iPods that are set to sync as well). Part of the processing of iSynCal requires each copy of iCal to be shut down whilst synchronising. Built into the app is local and network closure of associated copies of iCal to be synchronised. Also built-in is local reopening of iCal, but no re-opening of network versions.

I’ve set iSynCal to sync at midnight each night, which means that every day, I have to open iCal on both my iBook and my iMac, because iCal on each of them has been shut down. (It’s a hard life, I know!)

So far, I’ve tried a couple of workarounds within Automator, but I have a few issues, and wondered if anyone can help with this apparently simple issue. I’ve tried:

  1. Launch Application iCal - save as iCal plug-in. This works, but places a visible daily recurring event in iCal, which is ugly and confusing (perhaps I’m easily confused…).

  2. Launch Application iCal - drag workflow file onto Automator Loop Utility. This also works, but has to do so on a loop, measured in seconds. I suppose (and haven’t tried yet, so can’t confirm) I could set an interval of 25,200 seconds (7 hours), so I’m back up for seven each morning, but that would put me out of sync each ongoing day, as 7 into 24 doesn’t go too kindly. If I set at 28,800 seconds (8 hours), then I can’t take my updated iPod with me to an early appointment, should I need to leave the house before eight am, and if I choose 21,600 seconds (6 hours), then that’s four processes a day, when one is all I need. (NB iCal must close each time iSynCal runs).

By the way, one of the iCal calendars is version 1.5.5, running on OSX 10.2.8, so this will need to be run remotely in Automator, should anyone be kind enough to think of any suggestions.

Surely, there must be a simple AppleScript for opening an application at a designated time?

Thanks,

Matt

Model: G4 Cube 1GB RAM/G3 iBook 640MB RAM; AirPort Express/G3 iMac Rev B 640MB RAM/iPod Mac OS X (10.4.3) iMac OSX 10.2.8
Browser: Safari 416.13
Operating System: Mac OS X (10.4)

Hay matt.
have you tried setting an "open file alarm event in “ical” and set it to open icall at midnight repeating.

else
there is a way of hacking the systems crontab file to open a file at a set time but i,d try ical first.
peace,
truth

truth,

Thanks for your suggestions. I previously posted in Apple forums, and got this advice from Justin. CronniX is now installed and tested - all appears okay. If anyone can use this themselves, please give it a go.

"Hey Matt,

I don’t mean to keep pushing my one option, but I think it is most likely the best. If you put a
tell application “iCal”
activate
end tell

into cronnix and then set it to run every night at one o’clock, I do believe that would solve your problem. What I fear is that by using automator or applescript, you are creating a program that would be constantly counting, or looping, or repeating a check. Automator and applescript don’t tend to be too nice to your processor or memory when they are doing this. In fact, OS X tends to assume they have hung considering they seem to never end. Cronnix would be quite a be easier on your OS and hardware I would think.
–Justin S."

hi Matt,
if your using Cronix
try using this as the command;
open -a “ical”
peace
truth,

this is a bit over the top but i use this bash script at work cause im needed to be on msn at work, and always forget to open it.

and my crontab looked like
*/4 9-10 * * 1-5 sh msnscript.sh


#!/bin/sh
dnsServ='192.168.1.1' # i use actuall domain here so it will only run when im at work.
running=`ps A | grep  Messenger.app/Contents/MacOS | grep -v grep`
if [ -z  "$running" ]
  then
  if [ -f /etc/resolv.conf ];
        then
                var2=`cat /etc/resolv.conf | grep -i $dnsServ | cut -f 2 -d ' '`
        if [ -n $var2 ]
                then    
                if [ "X${var2}" = "X${dnsServ}" ]
                        then 
                        open /Applications/Microsoft\ Messenger.app
                        else 
                        exit
                        
                fi
        fi
  fi
fi