• 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
Crontab doesn't work for me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crontab doesn't work for me


  • Subject: Crontab doesn't work for me
  • From: Dan Doughtie <email@hidden>
  • Date: Tue, 21 Sep 2004 17:47:20 -0400

Title: Crontab doesn't work for me
I have an app running on an Xserve (10.3.5 Server) that occasionally goes south for no reason. This app monitors folders and moves text around and massages it as necessary. I also have an AppleScript inside Entourage that grabs mail and puts the cleaned email into the watched folders of this app.

I have a special line in that Entourage Applescript that tells that program to “activate”.  which it will do if it has crashed and an email comes in. Once in a blue moon Entourage crashes. If the app hasn’t crashed it just comes forward.

I really need to have that app running 7/24 so I wrote an applescript that when run activates it and Entourage too.

Using the example from Ethan Wilde’s book  on AppleScript For Applications I created a cron job that is supposed to run a compiled Applescript that basically tells an app to activate. (page 68)

The script run within Script Editor works like a charm. But it has never launched from within the cron. The app itself is not scriptable other than telling  it to launch.

I tried the script (called cronXportRestart).


Tell application “Finder”
Tell application “Transporter”
Activate
End Tell
Tell Application “Entourage”
Activate
End Tell
End Tell

Now it works with and without the Tell statement to the finder. And like I said it works within the Applescript inside Entourage. I’ve also tried it without the Entourage Tell.
--

Here is what I schedule in the cron

*/5 * * * * root /usr/bin/osascript /Users/myAccount/Library/Scripts/cronXportRestart.

Of course the first part tells it to run every 5 minutes. I modified this in reference to the “Unix for Mac” book, page 120, (I first tried it with “20” which was supposed to run at 20 minutes after the hour) but it didn’t work either.

(each space represents a tab).

The crontab doesn’t fuss so I assume the job is schedule correctly plus all of the elements line up perfectly with the other jobs that exist. I’ve reopened the crontab to make sure that it saved and it is. But nothing happens. I did a search for “osascript” and found it in the usr/bin path.

I also made sure the script was saved as a compiled script and not an app.

Didn’t work under 10.3.4 either.

Any ideas? I thought about writing an app that does the same thing every 5 minutes but I’ve had lousy luck writing “on idle” statements that work reliably.

Dan Doughtie
Morris Technology Services
 _______________________________________________
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: Crontab doesn't work for me
      • From: Gnarlodious <email@hidden>
    • Re: Crontab doesn't work for me
      • From: Brian Johnson <email@hidden>
    • Re: Crontab doesn't work for me
      • From: Martin Orpen <email@hidden>
  • Prev by Date: Re: Re : Vooley-voo... (was Bug ?)
  • Next by Date: Re: Excel 2004
  • Previous by thread: Re : Vooley-voo... (was Bug ?)
  • Next by thread: Re: Crontab doesn't work for me
  • Index(es):
    • Date
    • Thread