Skip to main content
espenmoe
Known Participant
November 11, 2012
Answered

Can my mac run a script every 15 minute?

  • November 11, 2012
  • 2 replies
  • 9327 views

I have osx 10.7 and indesign CS5, and I use a script I run several times a day.  Would it be possible to have my mac start this script automatically - maybe every 15 minute?

This topic has been closed for replies.
Correct answer -hans-

Maybe i was not clear, but I'm talking about running an Indesign-script every 15 minute, not just an Apple script.

So question: What is the syntax for running Indesign script from an Apple script?


Hi,

Kevin showed you the syntax to use AppleScript, sthg. like:

--open in Scripteditor, save as Programm with option stay open!

on idle

    tell application "Adobe InDesign CS5"

        --usage: do script pathToyourScript scriptinglanguage

        do script "Mac Red-Grafik 3:Users:claessen:Desktop:FunnyScript.jsx" language javascript --applescript language

    end tell

    return 900

end idle

Shareware for doing sheduled tasks: hazel

OSX BuiltIn LaunchD

Hope it'll help

Hans-Gerd Claßen

2 replies

Larry G. Schneider
Community Expert
Community Expert
November 12, 2012

Depends on what the script does. You really don't want it firing off when you are working in an app and the script targets that app.

espenmoe
espenmoeAuthor
Known Participant
November 12, 2012

Larry: I'm using a dedicatet Mac.

Inspiring
November 12, 2012

hi

yes it's possible, and there a varied ways to do it, heres a few ideas.

you could use CRON, which is daemon process running in the back ground all the time

or you could use a simple on idle applescript something like the below.

(* -- UNCOMMENT TO USE

on run

------------------------------------------------------------------------

-- INITIALIZATION OF APPS ,MOUNT SERVERS ETC HERE

------------------------------------------------------------------------

end run

*)

on idle

    ------------------------------------------

    -- YOUR SCRIPT HERE

    ------------------------------------------

    return 900 -- 15 MINUTES

end idle

(*

Save as a stay open application, script will run every 15 minutes

*)

espenmoe
espenmoeAuthor
Known Participant
November 12, 2012

Kevin: How do I define my script?  I'm a novice on apple script, so this is as far  as I got:  on run      application "Adobe InDesign CS5"  end run  on idle            return 9 -- 15 MINUTES end idl  I manage to start the app :-D  The name of my script is myscript

Inspiring
November 12, 2012

You can also add them to iCal events to fire them off or you could use Adobe's Bridge schedule tasks… What is the script… AppleScript or ESTK?