run a script daily?

Discussion in 'OS X' started by ero87, May 9, 2007.

  1. macrumors 65816

    ero87

    Joined:
    Jan 17, 2006
    Location:
    New York City
    #1
    Hey friends,

    Kind of a simple question, my friend asked me a Mac question and I couldn't answer it! She has an automator script that fetches daily National Geographic photos and makes them her desktop picture. However, she has to click on the script every day for it to function. Is there a way to make it silently run itself on a daily basis?

    Thanks!

    -E Ro
     
  2. macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #2
    In ical, make a daily event. then set an alarm, and select run script.
     
  3. thread starter macrumors 65816

    ero87

    Joined:
    Jan 17, 2006
    Location:
    New York City
    #3
    thanks for the suggestion, i did think of that... I was hoping for a solution that didn't involve cluttering up iCal with a daily event.

    any other ideas?
     
  4. macrumors regular

    Joined:
    Apr 20, 2007
    #4
    use cron
     
  5. macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #5
    You could make it it's own calendar and then hide the calendar, so you wouldn't see it.
     
  6. macrumors regular

    Joined:
    Apr 14, 2007
    #6
    For a relatively easy to use front end to cron (the built-in Unix task-scheduling daemon), download the freeware program CronniX.

    http://www.abstracture.de/projects-en/cronnix

    I used this to set up my daily stuff, like a script that runs at 2 every morning to quit and relaunch a program (URLWell) that doesn't save its settings except on quit. Works like a charm.
     
  7. macrumors regular

    Joined:
    Apr 20, 2007
    #7
    somehow my post was not sent completly.. :(
    here's the missing part of my first reply:

    open a terminal.. and run

    Code:
    crontab -e
    that will open an editor to .. edit.. your crontab file.
    a crontab file has a strict formating.. the first part of every line describes at what time it runs:

    Code:
    # Use the hash sign to prefix a comment
    # +---------------- minute (0 - 59)
    # |  +------------- hour (0 - 23)
    # |  |  +---------- day of month (1 - 31)
    # |  |  |  +------- month (1 - 12)
    # |  |  |  |  +---- day of week (0 - 7) (Sunday=0 or 7)
    # |  |  |  |  |
    # *  *  *  *  *  command to be executed
    for example:
    Code:
    0 0 * * * /Users/User_Name/superscript
    will run the script named superscript at 24 hours everyday.. the first 0 is the minute it should run. if you want it to run every 30 mins, you can write "0,30" instead of 0. The second 0, is the hour to run. the three * means to run the script every day of month, month, day of week.
     
  8. macrumors regular

    Joined:
    Apr 20, 2007
    #8
    ooooh.. that's a nice app, thanks for the link
     

Share This Page