how do i run an application at a certain time each day?

Discussion in 'OT Technology' started by xenon supra, Dec 3, 2007.

  1. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    I made an application from an automator workflow that I want to run every night. It backs up all of my school work and important files to my school's SMB drive.

    Can I do this through iCal? I used to know but I seem to have forgotten, or something changed on leopard maybe? Any help would be appreciated. :wavey:
     
  2. fishyhell

    fishyhell muscle68>catholic school children

    Joined:
    Aug 10, 2005
    Messages:
    918
    Likes Received:
    0
    Location:
    San Luis Obispo, CA
    Ummm i believe iCal can do it or you can run Awaken, an alarm software and it has the option of running a program.
     
  3. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    I'd prefer to do it with iCal..
     
  4. _Trev_

    _Trev_ Ya gotta pay the troll toll... OT Supporter

    Joined:
    Sep 30, 2004
    Messages:
    47,477
    Likes Received:
    0
    Location:
    Bay Area
    To schedule a workflow to run at specific times using iCal:

    1. Save the Automator workflow as an application.
    2. Select Add Alarm on a new or current event.
    3. Select Open File: Other, and open your saved workflow application.
    4. Enter the time and date that you want the workflow to run.

    Just keep iCal running
     
  5. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    ahh, perfect. I knew it was simple. :bigok: thanks
     
  6. _Trev_

    _Trev_ Ya gotta pay the troll toll... OT Supporter

    Joined:
    Sep 30, 2004
    Messages:
    47,477
    Likes Received:
    0
    Location:
    Bay Area
    here is what I use as an alarm:
    [​IMG]


    just change the MP3 to a workflow
     
  7. _Trev_

    _Trev_ Ya gotta pay the troll toll... OT Supporter

    Joined:
    Sep 30, 2004
    Messages:
    47,477
    Likes Received:
    0
    Location:
    Bay Area
    oh here ya go, this is easier
    1. “Save As Plug-In…” your workflow
    2. Choose Plug-In for: “iCal Alarm” in the pop-up menu of the dialog box that appears
    3. iCal opens itself and automatically creates an event with an alarm that opens your workflow
     
  8. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    I'll stick with the other way since I already set it up and I dont want to rewrite the workflow, but next time I need this I'll do it that way. Thanks man :)
     
  9. _Trev_

    _Trev_ Ya gotta pay the troll toll... OT Supporter

    Joined:
    Sep 30, 2004
    Messages:
    47,477
    Likes Received:
    0
    Location:
    Bay Area
    no prob. Just remember not to close iCal or it will only run when you open iCal again
     
  10. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    its cool, i dont absolutely need it to run every day, i just want it to backup more often than when i remember to do it manually. i leave ical open most of the time, but if i forget its not the end of the world.
     
  11. tenplanescrashing

    tenplanescrashing Active Member

    Joined:
    Jan 9, 2005
    Messages:
    9,287
    Likes Received:
    0
    can you verify that you HAVE to have iCal open for this to be true? i've set up some alarms for friend's birthdays and they've alerted me (pop-up screen) even when iCal wasn't running. I think a background application runs to allow this so you don't need iCal running all the time but have never tried this type of alarm.
     
  12. DouggieJ

    DouggieJ OT Supporter

    Joined:
    Nov 1, 2007
    Messages:
    8,126
    Likes Received:
    0
    Location:
    New York, NY USA
    If you are just backing up files to a server, I would do it just in a shell or Perl script and put it into the cron. Then it'll all happen in the background and you don't have to leave any program open.
     
  13. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    Example of how to do this? That would be great.
     
  14. DouggieJ

    DouggieJ OT Supporter

    Joined:
    Nov 1, 2007
    Messages:
    8,126
    Likes Received:
    0
    Location:
    New York, NY USA
    How are you transferring the files to the server? Is it a mounted disk or are you using FTP, etc?
     
  15. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    research crontab. makes life so easy!
     
  16. tenplanescrashing

    tenplanescrashing Active Member

    Joined:
    Jan 9, 2005
    Messages:
    9,287
    Likes Received:
    0
    i tested it at home and you don't need iCal open for alarms.
     
  17. xenon supra

    xenon supra OT Supporter

    Joined:
    Feb 3, 2005
    Messages:
    33,675
    Likes Received:
    0
    Location:
    San Diego, CA
    mounted disk. :wiggle:
     
  18. Legend Zero

    Legend Zero OT Supporter

    Joined:
    Jan 14, 2005
    Messages:
    35,867
    Likes Received:
    0
    i wish i knew how to use automater.
     
  19. DouggieJ

    DouggieJ OT Supporter

    Joined:
    Nov 1, 2007
    Messages:
    8,126
    Likes Received:
    0
    Location:
    New York, NY USA
    You should be able to just make a file like this:

    #!/usr/bin/bash
    cp /Users/yourhome/documents/dirtocopy/* /Volumes/serverdisk/wheretostore
    [ more cp commands as necessary ]

    then save that as "backup.sh" or something like that, chmod 755 on it and test it thoroughly to make sure it works and you can read the files it creates on the server.

    then use "crontab -e" to put into your cron

    For example adding:

    0 3 * * * /Users/myhome/backup.sh

    would run the backup.sh script everyday at 3 am. See "man -S 5 crontab" for details on what these values mean. Make sure again that it runs correctly and you can read the files when started automatically from the cron again. Then you should be able to forget it, it'll happen everyday without you even noticing anything.
     

Share This Page