Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I just moved to Apple, being an experienced (i'd like to think so) Windows user.

Recently I started using GMvault (gmvault.org) to backup my Gmail account locally, but it's become a pain having to manually launch a terminal and type ./gmvault sync -t quick myemail@gmail.com

if i wanted to automate this task on Mac OSX 10.8.2, what would be the right/best way to do it? Is it using an Automator task? I've heard of Cron too..so, Im open to suggestions. What is the most correct (and maintainable) way to do this?

In windows I would've just created a .bat file and setup a Scheduled Task.

Thanks for the help!

share|improve this question
add comment

1 Answer

As you mentioned you can use cron which is more transferable knowledge since it's used also on other platforms. Or you can use LaunchDaemon which is more Macish ;)

Cron

Please refer to question How do I run a cron job on a Mac?

Launchd

  • Doc
  • short how to
    • file for service looks like this
    • you will copy that file into /Library/LaunchAgents. If you want the daemon to be launched when you login, not when your computer start, just prepend ~(home) before the path

I am sorry for linking the code instead paste it here, but it seems i am not compatible with code adding here on apple.stack ;)

share|improve this answer
    
Mailo, ok, so it seems like crontab is a way to do it..so in addition to my question, if i wanted to avoid having to type the whole path of the gmvault executable, how can i add that so i can just execute ./gmvault regardless of the current terminal directory? in windows i'd do that using the PATH environment variable. –  GR7 Sep 27 '12 at 19:19
    
Sry, but i don't have much experience with Cron. I usually use launch daemon. Theres you just say what is the working directory by WorkingDirectory tag –  Mailo Sep 27 '12 at 21:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.