• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Running AppleScripts from Users CronTab [was (no subject)]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Running AppleScripts from Users CronTab [was (no subject)]


  • Subject: Running AppleScripts from Users CronTab [was (no subject)]
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Wed, 16 Nov 2005 13:48:00 +1100


On 11/15/05 3:46 PM, "Malcolm Fitzgerald" <email@hidden> wrote:


I'm having trouble getting cron to perform an applescript. I get the
message below in the mail. What is it trying to tell me?

[snip]

INIT_Processeses(), could not establish the default connection to the WindowServer.


On 16/11/2005, at 12:41 PM, Andrew Oliver wrote:

You AppleScript tried to attach to the UI server but it isn't permitted to
do so, presumably because the account in question was not logged in at the
time.

That's right.

There are some very specific issues about attaching to WindowServer, and
AppleScripts seem to try to attach even when there's no apparent reason to
do so (e.g. no user interaction required).

That's the case here. I'm beginning to wish that I was more skilful with bash.


Your solution is to either ensure you're logged in at the time the script
runs, or add the script to the root crontab (root can attach to the
WindowServer even when it isn't logged in).

Hmm, I'm only on this machine several times a week. I want this job to run daily. Most times that it runs I'll not be logged in. Sometimes no one will be logged in.


If I run the job via root's crontab how will I handle permissions? I'd like the output to be stored in my user space with my permissions but I imagine that a job run as root will produce files that are owned by root.


Malcolm Fitzgerald ph: 02 93180877 Database Manager fax: 02 93180530 The Australian Society of Authors www.asauthors.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Running AppleScripts from Users CronTab [was (no subject)]
      • From: Christopher Nebel <email@hidden>
References: 
 >Re: (no subject) (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: Switching iChat Accounts
  • Next by Date: Web text to word
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: Running AppleScripts from Users CronTab [was (no subject)]
  • Index(es):
    • Date
    • Thread