Re: How do I schedule a script
Re: How do I schedule a script
- Subject: Re: How do I schedule a script
- From: Donald Hall <email@hidden>
- Date: Wed, 14 Jan 2004 23:00:27 -0700
About two years ago on this list there was a discussion about running
compiled scripts with cron and osascript. The conclusion was that
scripts that interacted with programs with a GUI, including the
Finder, had to be made into applications. Here's what was said:
>
On 1/10/02 8:30 PM, "Christopher Nebel" <email@hidden> wrote:
>
>
> On Thursday, January 10, 2002, at 08:36 AM, Ben wrote:
>
>
>
>> I have the latest version of Mac OS X. I am trying to get cron to run a
>
>> script that loads a web page. The script works fine. I cant seem to
>
>> get
>
>> this to be reliable. I have classic open and I rely on Ido script
>
>> scheduler. That works without a problem. Any suggestions?
>
>
>
> Yes -- don't use cron. For security reasons, scripts run from cron
>
> can't send events to normal applications (e.g. the Finder, IE, etc.).
>
> Use a script scheduler that runs as a normal user task, not one that
>
> starts up at boot time like cron does.
Don
At 7:13 PM -0800 2004/01/14, email@hidden wrote:
>
Date: Wed, 14 Jan 2004 18:53:23 -0500
>
From: Graff <email@hidden>
>
Subject: Re: How do I schedule a script
>
To: AppleScript-Users <email@hidden>
>
>
From the man page for osascript:
>
"osascript executes the given script file, or standard input if none is
>
given. Scripts may be plain text or compiled scripts."
>
>
- Ken
>
>
On Jan 14, 2004, at 6:24 PM, Paul Berkowitz wrote:
>
>
> Something looks odd there. The .applescript extension is used by
>
> AppleScript
>
> Studio for _uncompiled_ text files (which are compiled for the Build
>
> and
>
> become .scpt files in the build). Compiled scripts have the .scpt
>
> extension.
>
>
>
> Does osascript expect text files such as .applescript or .txt files,
>
> whose
>
> content it would compile itself, or does it want .scpt files already
>
> compiled and saved by a script editor?
>
>
>
> --
>
> Paul Berkowitz
>
>
>
>
>
>> From: Stephen Jonke <email@hidden>
>
>> Date: Wed, 14 Jan 2004 17:06:21 -0500
>
>> To: AppleScript List <email@hidden>
>
>> Subject: Re: How do I schedule a script
>
>>
>
>> You can run a compiled applescript via cron (and in the terminal or a
>
>> shell script) by using the command-line command osascript, such as
>
>> this:
>
>>
>
>> /usr/bin/osascript /path/to/the/script.applescript
>
>>
>
>> For cron entries use the full path to the osascript command as shown,
>
>> as well as the full path to your script. Your applescript being in the
>
>> file "script.applescript" or whatever name you chose.
>
>>
>
>> IMHO Cronnix only makes CRON somewhat easier to use, not easy in a Mac
>
>> sense. Still, cron is a service that's built-in and thus "free".
>
>>
>
>> Steve
>
>>
>
>> On Jan 14, 2004, at 4:21 PM, j.e.b. wrote:
>
>>> Mark
>
>>>
>
>>> Is it possible to run a compiled script via Cron or just an
>
>>> application as
>
>>> you mentioned in your post.
>
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.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.