> Entity Jeff Grossman spoke thus:
>
[quoted text clipped - 9 lines]
> password "password"
> end if
on idle
if "DISKNAME" is not in (list disks) then
mount volume "afp://hostname/sharename" as user name "username"
with password "password"
end if
return 60
end idle
Save as an application. Checks whether the server is connected every
60 seconds. Change the "return 60" line for longer or shorter interval
as desired.

Signature
Jerry Kindall, Seattle, WA <http://www.jerrykindall.com/>
Send only plain text messages under 32K to the Reply-To address.
This mailbox is filtered aggressively to thwart spam and viruses.
Gnarlodious - 22 Dec 2005 22:53 GMT
Entity Jerry Kindall uttered this profundity:
>>> I want something unattended to
>>> re-mount the file server.
[quoted text clipped - 18 lines]
> 60 seconds. Change the "return 60" line for longer or shorter interval
> as desired.
I believe this example would need to be saved as "Stay Open Application.
The difference between the Cronnix solution and the "stay-open" solution is
this:
Cronnix will run the script every so often using very little processor
resources and it will do so invisibly. You can't normally just "turn it
off". This is ideal if a disk needs to be mounted all the time.
The stay-open script application will run as long as the script is running,
when you quit the script it will stop checking and remounting. Unfortunately
stay-open scripts sort of use a lot of processor and I avoid them if
possible. Since the "list disks" command also pings the other machine it
works well to maintain a mount where the AFP machine would timeout from
inactivity. I believe the AFP timeout is 5 minutes for ServerX.
The stay-open script would be a better solution if you want to only remount
the disk sometimes. Also, the 1 minute parameter is ideal for the stay-open
script. If you wanted to avoid problems with unreliable internet connections
probably a 5 minute interval (or more) would be better. A script that is
trying to mount a cranky network disk every 1 minute can be a problem.
Hope that spells out some of the variables...
-- Gnarlie
Jeff Grossman - 24 Dec 2005 17:08 GMT
> Entity Jerry Kindall uttered this profundity:
>
[quoted text clipped - 43 lines]
>
> Hope that spells out some of the variables...
Thank you for the information. This post is very informative and I need
to figure out what the best option is for my particular case. I will
probably run both and see which one runs the most efficient and most
reliable.
Thanks for again for everybodys help.
Jeff
Jeff Grossman - 24 Dec 2005 17:06 GMT
>> Entity Jeff Grossman spoke thus:
>>
[quoted text clipped - 21 lines]
> 60 seconds. Change the "return 60" line for longer or shorter interval
> as desired.
I won't need to run any time of cron program to run the application
every 60 seconds? Applescript will keep the program open and just run
it every 60 seconds for me? This sounds like it might work for me.
Thanks for the information.
Jeff
> Entity Jeff Grossman spoke thus:
>
[quoted text clipped - 21 lines]
> -- Gnarlie's Applescript page:
> http://Gnarlodious.com/Apple/AppleScript/
Thank you for this information. I will take a look. I would prefer to
run not another application, but if I have to, I will probably do it.
Jeff