Automating a script

Discussion in 'OT Technology' started by k2737, Feb 12, 2007.

  1. k2737

    k2737 Active Member

    Joined:
    Nov 29, 2004
    Messages:
    3,324
    Likes Received:
    0
    Location:
    Ft Lauderdale
    How can I set up a script to run M-F at 10am? This is on a brand new MBP. :hs:
     
  2. ih8mice

    ih8mice New Member

    Joined:
    Dec 14, 2006
    Messages:
    417
    Likes Received:
    0
    Location:
    MI
    i'm not real familiar with automator...but it sounds like a task that it should handle
     
  3. TheManLouisianaFace

    TheManLouisianaFace and decide!

    Joined:
    Sep 22, 2004
    Messages:
    32,995
    Likes Received:
    0
  4. k2737

    k2737 Active Member

    Joined:
    Nov 29, 2004
    Messages:
    3,324
    Likes Received:
    0
    Location:
    Ft Lauderdale
    Do macs have cron similar to linux? I want a backup script to be run daily. Also I would prefer if it was independent of what user is logged in.
     
  5. ez4me2c3d

    ez4me2c3d Cold Member

    Joined:
    Sep 19, 2003
    Messages:
    1,836
    Likes Received:
    0
    Location:
    Minneapolis, MN
    For simpe use of cron jobs:
    Open term and type
    Code:
    crontab -e
    You should now be in VI editor, press i to enter edit mode, and type
    Code:
    0 10 * * Mon-Fri CommandToRun
    Now press ESC, and type
    Code:
    :wq
    That's it. Now cron will check your crontab file every minute to see if it needs to run your CommandToRun, and if so, it will run, and any output will be mailed to [email protected]l

    To check your mail, open a Term and type 'mail'
     
  6. k2737

    k2737 Active Member

    Joined:
    Nov 29, 2004
    Messages:
    3,324
    Likes Received:
    0
    Location:
    Ft Lauderdale
    Nice, I have used cron in Linux for years, but when I googled it for Mac's it came up with this long list of shit you had to do. But since it is pretty much the same as in Linux this job will now be a no brainer. Thanks. :bigthumb:
     
  7. ez4me2c3d

    ez4me2c3d Cold Member

    Joined:
    Sep 19, 2003
    Messages:
    1,836
    Likes Received:
    0
    Location:
    Minneapolis, MN
    If you are ever wandering if Mac OS X can do something that you use to do in *nix, it probably can. It's Free BSD[1] under the hood baby.

    [1] It's an Apple version of BSD to be technical about it
     
  8. ez4me2c3d

    ez4me2c3d Cold Member

    Joined:
    Sep 19, 2003
    Messages:
    1,836
    Likes Received:
    0
    Location:
    Minneapolis, MN
    nigga always has my back. WHAT?
     

Share This Page