• 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
Re: AppleScript as cron job
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript as cron job


  • Subject: Re: AppleScript as cron job
  • From: Steve Mills <email@hidden>
  • Date: Mon, 20 Oct 2003 15:41:00 -0500

On Monday, Oct 20, 2003, at 15:09 US/Central, Timothy K. Wilkinson wrote:

I need to run a script on my server each night to clean out old files. I've
got a script that does it very well and runs perfectly from Script Editor
and as a compiled application. However I haven't had any success running it
as a cron job, even as root.

Anyone have any success running AppleScripts as cron jobs? Any words of
wisdom?

Yup. Here's an entry from my crontab:

*/3 8-17 * * 1-5 osascript /Users/sjmills/Library/Scripts/BuildFileOfLast10Songs

You'll notice there is no "user" column because this is *my* crontab, not root's.

Personally, I keep all my tasks in a text file called mycrontab, edit that when I want to make changes, then do "crontab mycrontab" to apply those changes to cron. I prefer this method because I always know I have a copy of mycrontab, like in case I need to totally reinstall, and I can also easily copy it to another machine, etc.

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.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.

References: 
 >AppleScript as cron job (From: "Timothy K. Wilkinson" <email@hidden>)

  • Prev by Date: Re: AppleScript as cron job
  • Next by Date: Get IP Address
  • Previous by thread: Re: AppleScript as cron job
  • Next by thread: Re: AppleScript as cron job
  • Index(es):
    • Date
    • Thread