automating isync

Discussion in 'macOS' started by thumb, Aug 4, 2005.

  1. thumb macrumors 6502

    Joined:
    May 8, 2005
    #1
    Hello all,

    I know I have seen this discussed now and again, but never definitively answered.

    I have an isync supported bluetooth phone (Moto e815). I want the calendar to sync fully automatically (no button pressing, no nothing) every hour or so. I leave BT enabled on phone with no noticable battery drain.

    Any thoughts on how best to do this. I know of the program "sync now" which basically just opens isync and syncs (reducing the process to one click - but one still has to remember to do it). Is there a way to schedule that program to run once and hour.

    This sounds like a job for automator, but there are no isync options in automator.

    Thanks for any help you can provide, this would make my life much better organized (and let me tell you, it needs it).

    thumb
     
  2. thumb thread starter macrumors 6502

    Joined:
    May 8, 2005
  3. skunk macrumors G4

    skunk

    Joined:
    Jun 29, 2002
    Location:
    Republic of Ukistan
    #3
    You can get your computer to sync every hour through iSync prefs in .mac (if you're on .mac), but I don't know if you can do the same with the phone. Isn't there a prefs screen on the phone for that?
     
  4. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #4
    If Sync Now automatically initiates a sync when it is run, and then quits, then you can do this with one more utility in your bag of tricks:

    http://quicksilver.caup.washington.edu/software/Crontooie/

    Well, actually you don't *need* it. Crontooie lets you execute commands at set intervals using cron (which is built in -- you can actually edit the crontab without this, but it does add a GUI way to do it). Now all you need to do is add in Sync Now as a cron activity, and you should be set. You probably need to add it in with the syntax:

    open "/applications/sync now.app"

    Assuming that's the actual name of the app. You need the quotes only if it has a space in the name, natch.

    I'm assuming that you don't have to *quit* Sync Now, and that it automatically kills itself when it's done. This might be a little more complicated if that's not the case.

    Mind you... I am pretty sure you will get a fail-to-sync message if your device is out of range and your computer is on at the scheduled time.

    Also, if you have trouble with this, you might be able to use iCal scheduling -- you can run any program at a set time as the "alarm" for an iCal event. You could create a separate calendar, insert recurring sync now events, and then use that mechanism. But I think cron will be better, and I'm not sure that, if you put your computer to sleep for several hours, and come back, that iCal will not try to repeatedly sync your device when you turn it on.
     
  5. thumb thread starter macrumors 6502

    Joined:
    May 8, 2005
    #5

    mkirshnan, you are a scholar and a gentleman. I think that is exactly what I am looking for. However, I cannot seem to get it work.

    Sync Now (that is what it is indeed called, and can be gotten here does indeed kill itself after running, and generates no un wieldly errors if phone is not in range.

    However, I am not getting crontooie to work well. do you have a suggestion for the exact entries into the interface? I input
    50 * * * * * to have it opperate on the 50th minute of every hour. i used your command line: open/applications/syncnow.app (I changed the app name to one word). But this never works. any thoughts?

    I went into my crontabs in terminal, and none of the ones i have made with crontooie are there (it is empty, a system note says automated maintaince has been moved to launchdaemons). Does Crontooie work with 10.4?

    I really do appreciate any help you can provide me.

    thumb
     
  6. the-fish macrumors member

    Joined:
    Jul 28, 2005
    #6
    A bit off topic but in Panther didn't iSync actually work? In Tiger they've abandoned it for .Mac syncing and disabled automatic device sync *sob*
     
  7. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #7
    Okay, it's slightly more complicated for some reason than I thought, but I did get it to work on my computer (10.4.2).

    First, the minutes entry in cron refers to the minute of the hour. Like you said. The thing I said wrong is that you cannot put open into the command field for some reason. This is what I did.

    Go to terminal.
    Go somewhere in your home directory (in this example, I have a folder /users/(me)/scripts)
    pico sync

    In the sync file, put in the single line:

    open /applications/utilities/sync now.app"

    Or whatever your appropriate path and filename are.

    Then save this file and execute:

    chmod 755 sync

    This makes it into an executable script.

    Now, in Crontooie, or however you edit your crontab, put in this script by name:

    /users/(you)/scripts/sync

    in the command field.

    This worked for me.

    I like it... in fact, I'm thinking I ought to keep it. :D

    EDIT: after I clicked save and quit in crontooie, fwiw, it did show up when I did crontab -l from the terminal. :)
     
  8. thumb thread starter macrumors 6502

    Joined:
    May 8, 2005
    #8
    mkrishnan,

    thank you for your help. I got it to work as well, but instead of using crontooie I used Cronnix, which is an even simplier interface (it allows browsing to find the file to open). It turns out I need a usr/bin prefex, so that would probably also work on crontooie.

    I found another user who matched his script up to Salling Clicker, so that it only synced (sanc?) upon detection of cellphone, but my phone (moto e815) doesnt support SC as far as i know (any thoughts on that???).

    Again, thanks.
     
  9. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #9
    Hmmmm... no thoughts on how to get Sailing Clicker to work if your phone is not supported by it. :( I might try that too... So the idea there is that the phone syncs whenever it enters BT range?

    I have been using cron scheduling of Sync Now for the past few days and I must say that I really, really like it. :) Very unobtrusive... although it would be nice if there were a way to make iSync stay hidden while it was running under Sync Now.
     
  10. thumb thread starter macrumors 6502

    Joined:
    May 8, 2005
    #10
    mkrishnan,

    here is the site that incorporates salling clicker.

    let me know if you get it work in the background (i guess the easiest would be to always have isync running in background, syncnow will not quit it if isync was already running. however, doing this would cause the failed messages to appear when the phone is not present). personally, i dont mind it running on desktop, that way i know it is working.

    cheers,
     

Share This Page