Can my mac run a script every 15 minute?

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?

Hans!
I have been testing this script for many times, and every time it fails to close the indesign-document! The original script you wrote (the small one that did not kill Apple-script-popup) did manage to close indesign-documents.
Any idea why?
I have changed my Indesign script so it does not end the job with a jolly popup message, so that problem is solved.
The only problem left is the timeout message from Applescript.
property pathToScript : ""
on idle
          if pathToScript is "" then set pathToScript to (choose file with prompt "Please choose the Javascriptfile") as text
          my clickAlertButton()
          with timeout of 60 seconds
                    try
                              tell application "Adobe InDesign CS5" --<<<<<<<YOUR APP!!!
  do script pathToScript language javascript
                              end tell
                    on error e
  activate
  display dialog e giving up after 3
                    end try
          end timeout
          return 30
end idle
on clickAlertButton()
          tell application "System Events"
                    set namesOfCurrProcesses to name of every process
                    if namesOfCurrProcesses contains "Adobe InDesign CS5.5" then --<<<<<<<YOUR APP!!!
                              try
                                        tell process "Adobe InDesign CS5" --<<<<<<<YOUR APP!!!
                                                  if accessibility description of window 1 is "alert" then
                                                            click button "OK" of window 1
                                                  end if
                                        end tell
                              on error e
  activate
  display dialog e giving up after 3
                              end try
                    end if
          end tell
end clickAlertButton

Similar Messages

  • Run SQL script every 5 minutes

    Hi:
    I have a script which monitor the database. I want to make it to reflsh every 5 minutes on Linux. How to do it?
    Thank you.

    Hi,
    Here is the small example.
    Open the crontab in editing mode
    $crontab -e
    Insert following line.
    */5 * * * * /home/oracle/scripts/monitor.sh
    This will schedule monitor.sh script to run every 5 minutes.
    You can write any of your type in monitoring. For example following script will monitor alert.log errors...
    #!/bin/ksh
    . /etc/oracle.profile
    for SID in `cat $ORACLE_HOME/sidlist`
    do
    cd $ORACLE_BASE/admin/$SID/bdump
    if [ -f alert_${SID}.log ]
    then
    mv alert_${SID}.log alert_work.log
    touch alert_${SID}.log
    cat alert_work.log >> alert_${SID}.hist
    grep ORA- alert_work.log > alert.err
    fi
    if [ `cat alert.err|wc -l` -gt 0 ]
    then
    mailx -s "${SID} ORACLE ERRORS" [email protected] < alert.err
    fi
    rm -f alert.err
    rm -f alert_work.log
    done
    Note- Above is just for exmaple.
    Regards

  • HT1752 what can i do if it crashes every 20 minutes

    what can i do if my mac crashes on me every 20 minutes .i can be on da internet or itunes. i know its an old mac but i've been very comfortable wit it. and it just started freezeing on me and i can't find out y .maybe some one can find an answer for me.

    Have you done any maintenance?
    Mac OS X: System maintenance
    http://discussions.apple.com/thread.jspa?messageID=607640
    Boot up using your Install disc and repair Permissions and repair hard drive.
    Boot in Safe Mode. See What is Safe Boot, Safe Mode? (Mac OS X)
    http://docs.info.apple.com/article.html?artnum=107392 Takes a while to run, but it usually "fixes" problems.
    Safe Boot takes longer than normal startup
    http://support.apple.com/kb/TS1884?viewlocale=en_US
     Cheers, Tom

  • Why does my mac go to sleep every 30 minutes?

    When watching a film my mac logs off after every 30 minutes. I have checked my energy saver preferences and moved everything to never sleep and unchecked 'put hard disks to sleep when possible' but still it sleeps after 30 minutes of non-use.
    Is there something i'm missing?

    From the menu bar, select
     ▹ System Preferences... ▹ Security & Privacy ▹ Advanced... ▹ Log out after … minutes of inactivity: Off
    If there's a closed padlock icon in the lower left corner of the preference pane, you may need to click it to unlock the settings. Enter your login password when prompted.
    These instructions apply to OS X 10.7 or later. If you're running an older version of OS X, the preference pane may have a different name.

  • How can I run script every 10 minutes

    Hello ,
    I just wondering if oracle application server has a way to run a normal java class,servlet or JSP for every (for example) 10 minutes.
    I mean I want to automate a java class for a spesific time like running a script on UNIX using CRON JOB
    Regards

    Mr. user510124,
    Please try to be as specific as possible. Mr. Raghavendra has given you a very good solution, which you can use. Other possible solution would be to schedule it with crontab (Unix) or using Oracle Grid Control.
    Regards,
    Martin

  • Run a script every workday

    Hello,
    I have several scripts I need to run every workday. During weekends I need to skip these scripts. I can't figure from launchd and launchd.plist man pages how could I make only one property list for each of these scripts. So I tried this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.justme.workdaystest</string>
    <key>ProgramArguments</key>
    <array>
    <string>/scripts/workdaystest.command</string>
    </array>
    <key>QueueDirectories</key>
    <array/>
    <key>StartCalendarInterval</key>
    <dict>
    <key>Hour</key>
    <integer>11</integer>
    <key>Minute</key>
    <integer>30</integer>
    <key>Weekday</key>
    <integer>1</integer>
    <key>Weekday</key>
    <integer>2</integer>
    <key>Weekday</key>
    <integer>3</integer>
    <key>Weekday</key>
    <integer>4</integer>
    <key>Weekday</key>
    <integer>5</integer>
    </dict>
    <key>WatchPaths</key>
    <array/>
    </dict>
    </plist>
    That didn't work. Do I need to maintain 5 x plist for each script?
    Juha

    J.Otava wrote:
    Hello,
    From the other topic I found need for arrays. Problem is I'm not sure how to create valid arrays. After some trials and errors I managed to create a valid XML-file, at least launchctl loads it without error messages. But nothing happens.
    Here's the code if someone is interested, should run a script on mondays and tuesdays:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.memyselfandi.ldaemontest3</string>
    <key>ProgramArguments</key>
    <array>
    <string>/scripts/ldaemontest.command</string>
    </array>
    <key>QueueDirectories</key>
    <array/>
    <key>StartCalendarInterval</key>
    <array>
    <dict>
    <key>Hour</key>
    <integer>12</integer>
    <key>Minute</key>
    <integer>0</integer>
    <key>Weekday</key>
    <integer>2</integer>
    </dict>
    <dict>
    <key>Hour</key>
    <integer>12</integer>
    <key>Minute</key>
    <integer>0</integer>
    <key>Weekday</key>
    <integer>3</integer>
    </dict>
    </array>
    <key>WatchPaths</key>
    <array/>
    </dict>
    </plist>
    The array you've made is constructed correctly. if it's not working something else is wrong. check your console messages at the times when the script has to run. see anything? also, check that you load the plist properly.
    P.S. why do you have that empty Watch Path there? it's not doing anything.
    and you have an incorrectly constructed array that starts after QueueDirectories
    and ends after Watchpath. what is it doing there? perhaps that's what's creating the problem?
    My best
    Juha
    Message was edited by: V.K.

  • Can my mac running 10.5.8 install 10.6?

    How do I understand whether my Mac running OS X 10.5.8 can upgrade to OS X 10.6? I don't know what the requirements are, and I've looked at them on the internet. All I know is my specs:
    Hardware Overview:
      Model Name:          MacBook Pro 15"
      Model Identifier:          MacBookPro1,1
      Processor Name:          Intel Core Duo
      Processor Speed:          2.16 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      Memory:          2 GB
    WILL SOMEONE PLEASE TELL ME WHETHER MY MAC IS CAPABLE OF INSTALLING OS X 10.6, PLEASE??
    {*bangsheadonkeyboard*}

    Yes, any MBP with an Intel processor  and 1-2 GB of RAM (and I had a 1,1 version, too, and the last update I could make was to Snow Leopard) can run SL.
    You'll have to purchase it from the online Apple Store - http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard - and then install the updates until you get to the 'latest' version of SL - 10.6.8.
    Only $20 plus taxes and shipping - and the only way to get your hands on it.
    Good luck,
    Clinton

  • Can't add "Run Shell Script" in Automator

    When I drag "Run Shell Script" to the right pane in Automator nothing happens. All other applications I've tried can be dragged to the right pane. In the system.log I can find the following message:
    Feb  7 16:56:48 Bananaboat Automator[195]: Error : -[AMWorkflowView _addAction:Kör kommandotolksskript] : * -[NSTextView replaceCharactersInRange:withString:]: nil NSString given.
    "Kör kommandotolksskript" is "Run Shell Script" in Swedish.
    Any ideas how to fix this?

    You might have a corrupted file in the action, in which case you could reload it with something like Pacifist. You can't get the digest of a directory, so for comparison, compressing a copy of /System/Library/Automator/Run Shell Script.action on my desktop gives me the following:
    sha1 digest: c209b69777f6a3301d72ddf0eb0ad4e7d4230741
    md5 digest: 09e4ade9056ada3294ffb93bd16de1a7

  • Running labview program every five minutes

    I am very inexperienced with Labview, but I am attempting to build a program.  This program is to get measurements of frequency (can be used to determine strain) and resistance (can be used to measure temperature).  I got the program to work when I push a button on the front panel to start the process and then process data when I push another button.  I need to get this process to be automated because it needs to run for a long time.  I want to take measurements (frequency and temperature) every five minutes. Also, I need to have some delay (maybe 10 sec) before the data is processed because it take time for the data to be received.  Any help is appreciated. I attached the .vi Thanks! 
    Attachments:
    VW DAQ.vi ‏266 KB

    GerdW wrote:
    Hi laplanmd,
    well, you didn't read the style guide before?
    That is the understatement of the year!    Hidden wires everywhere.  I would love to see the tracing with highlite execution on.  SampleCount is a race condition just waiting to happen.
    To the OP:  Please think of us poor volunteers that have to waddle through this mess to try to help you.  We can't decipher code that has hidden wires, right to left wires, structures put on top of controls/indicators.  Please try to clean things up before posting.  In your case, a total re-write using a state machine is very appropriate.
    - tbob
    Inventor of the WORM Global

  • How can I Refresh the DashBords for every 5 minutes with latest data

    Hi,
    Here we are Using the DashBoards which are accessing the data from SSAS Data bases to the DashBoards.
    From Dash Boards page, we have to refresh the Dash Boards for the latest Data for every 5 minutes.
    can any body provide the solution for this.
    Thanks,
    Supraja.
    SUPRAJA'S

    Hi Tom,
    sorry for late response.
    i have Analysis services(AS) Data base. which is configured with ROLAP settings in SSAS.
    we are showing this AS Database Information in Dash boards.
    once we open the dash board, it will shows the latest information in dash boards obviously. 
    but, Mean while if any changes occured in AS data base, if we want to get that changes in dash boards we have to refresh the dash board (OR) we have to close & reopen the same dash board.
    apart from this if is there any other solutions technically,  Please suggest me.
    Thanks,
    SUPRAJA'S

  • How can I automatically reload a page every few minutes?

    I want the page I have up to reload every few minutes - how can I set Safari (or another browser if necessary) to do that?

    Reload Safari page with automator
    Automatic Page Refresh...
    applescript to refresh a web page every...:

  • Can a MaC run these programs

    I need these progrmas for work so I was wondering if I can run these programs before i go out and purchase a MacPro...the first one is DocMaster and the next is a file format and its a .PRN file...does mac support these items? hope to hear from anyone soon...would really help me make my decision...
    MACbookPro   Mac OS X (10.4.5)  

    Google is your friend! :-P
    There seem to be multiple apps called DocMaster, and they are all Windows-specific:
    http://www.docmagic.com/download/docmaster.jsp
    http://www.stratussoftware.com/docmastermain.html
    http://www.omnisys.co.il/itsolutions/main.asp?lngCategoryid=1930
    .prn is a Windows-specific file format for printing purposes, basically what you get when doing a 'print to file' on /Windows. Unlike PostScript (.ps) or PDF it's not cross-platform.
    http://www.frogmorecs.com/arts/whatis_a_prnfile.html
    So, no.
    Ian

  • Can a Mac running OS X Server be converted to just regular OS X?

    I am considering buying a Mac Mini; it is configured to run OS X Server, but I was wondering if this can be overwritten just with regular OS X? I ask because whilst I am attracted to the spec of the Mini in question, I don't intend using it as a server. Do I indeed need to overwrite the OS, as I know that Server comes with all of the regular OS apps, etc.
    Thanks in anticipation of any advice given. :)

    Yes, it can. You can simply remove the Server app, all OS X Server really is is a GUI for existing UNIX software. You don't need to reformat & reinstall.

  • Can all macs run .app files or .jar files?

    Hi everyone,
    I'm very confused concerning .app and .jar files. Do all macs natively have the capability to run .jar files?
    If not, could i use the jar bundler to create an .app file (would that run on all macs)?
    thanks

    .jar files are Java files. They may or may not run on most Macs because most Macs do not have Java installed. But one can bundle the Jave interpreter so that Java need not be present on the target computer.
    .app files are true executable applications.

  • Can my Mac run Mavericks?

    The system requirments section of the Mavericks page says Mac Pro early 2008 or newer, but I do not remember how old my computer is.  How can I determine whether mine is new enough?

    Check to make sure your applications are compatible. PowerPC applications are no longer supported after 10.6.      
    Application Compatibility
    Applications Compatibility (2)

Maybe you are looking for

  • Batch edit Address Book entries

    Does anyone know of a way to change a number of address book entries at the same time? Say, for example, You move offices. Now you need to change the work address for 150 people... how would you go about doing that?

  • HTML Combo Box Question

    I generate an HTML page with a Servlet and I have a combo box that lists numbers 1-20. Depending on a parameter that is passed to the servlet I want to set the Combo box to be initalized to (display) a certain number. Does anybody know how I can do t

  • FrontRow & iTunes Extras

    Apologies if this has already been answered - I've had a search around and couldn't find anything definitive. Are iTunes Extras movies purchased from iTunes playable from Front Row? Even if only the movie itself shows up, that would be fine, although

  • Getting Warning while assigning Dimension in to Model in version 10.0

    Hi, Iam getting an warning message "Control definition not valid because new Dimension are added in to Model" & "Control result was reset because new Dimension are added in to Model" while assigning Dimensions to the Model. Please help me on this iss

  • Upgrade to OS 10.4 to ????

    I have the OS 10.4. I have found recently that I need to upgrade my Safari before getting on some sites that I usually go on, but first I need to upgrade to Mac OS 10.4.9 or 10. Do I have to install any other upgrades before I do the OS 10.9 or 10 ?