Re: OS X replacement for Script Scheduler
Re: OS X replacement for Script Scheduler
- Subject: Re: OS X replacement for Script Scheduler
- From: Charles Arthur <email@hidden>
- Date: Thu, 9 May 2002 16:19:06 +0100
On Thu, 09 May 2002 09:49:07 +0100, Mr Tea <email@hidden> wrote:
>
This from garbanzito - dated 8/5/02 04.44 pm:
>
>
> if your scripts don't require user interaction, you can run
>
> them via cron and osascript -- see the man pages.
>
>
One day soon, I hope to be able to look at the terminal's man pages and
>
understand what I'm seeing. Currently it's like trying to spot a friend in
>
the crowds at Liverpool Street station during the rush hour.
Hey, that's me! Platform 1, train to King's Lynn. See, waving?
A good way to read man pages is via the app ManOpen - freeware,
opensourceware too if you want to monkey with the code. Cocoa, I think, so
also does services. I use it a lot. Much easier than terminal man pages.
(Many years ago I discovered myself on a Unix system, not knowing it was
Unix or anything about Unix, and discovered "man", including "man man". I
spent quite a long time trying to bootstrap myself into *nix.... and failed
completely.)
>
I tried using the osascript command through CronniX with only partial
>
success, and quickly stumbled over a problem with running scripts that tell
>
the Finder to do something - they failed with the error "Finder got an
>
error. Application isn't running." Why?
Isn't this the thing that Chris N has explained where cron runs stuff via
root, but root isn't the owner of the script-saved-as-app, or perhaps the
currently-running-app-you-use (eg Finder) and so doesn't have the right
permission (even though I thought root had every permission it could ever
need...) ?
So for cron to run a script, because cron is owned by root, the script has
to be owned by root. Dunno how you pass details.
Surely an easier way to time scripts' running would be to have them as a
stay-open which runs every minute or so, and then have a "do shell script"
in the idle handler to check the time and date (using date() - it's very
flexible, down to seconds, up to centuries) and if it's the right time and
date, do your execution handler and then quit. Or not quit - just sit there
in the background.
Charles
----------------------------
http://www.ukclimbing.com : 1100+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. And there's even a cool shop attached.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.