10.6: Startup Item doesn't run, only on scheduled restarts

Discussion in 'macOS' started by adamfishercox, Jun 3, 2012.

  1. adamfishercox macrumors 6502

    Joined:
    Aug 15, 2007
    #1
    I'm using a Mac mini as an entertainment center set-top-box. One of its login items is a script that moves the cursor off-screen. This login item runs fine on a restart, a log in, and regular startup, but apparently fails to work on a scheduled restart.

    I have the mini set to restart at 3AM every day, and every day when I go to watch something, the cursor is sitting at its default position on the Apple menu.

    Any ideas why this is happening?
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    Maybe check the console log for entries at the 0300 restart to see if any errors are showing that would help you troubleshoot?
     
  3. adamfishercox thread starter macrumors 6502

    Joined:
    Aug 15, 2007
    #3
    Only things that maybe apply are these:

    Code:
    6/4/12 3:13:32 PM	com.apple.launchd[1]	(com.apple.SystemStarter) Failed to count the number of files in "/System/Library/StartupItems": No such file or directory
    
    6/4/12 3:13:47 PM	com.apple.launchd.peruser.501[99]	(com.apple.ReportCrash) Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self
    
    6/4/12 3:13:50 PM	com.apple.launchd.peruser.501[99]	(com.plexapp.helper[133]) posix_spawn("/Applications/Plex.app/Contents/Resources/Plex/tools/osx/PlexHelper", ...): No such file or directory
    Similar things are repeated a lot in the console, but they show the same way on a regular restart too. It doesn't say anything about the script, like it ignored it entirely.
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    I wonder if the cursor is not visible yet and the script is running properly but not doing anything since there is no cursor to act on?

    How about try putting "delay 3" (without the quotes) at the start of the Applescript. That would give the system three seconds to settle down and display the cursor before your remove cursor script runs.
     
  5. adamfishercox thread starter macrumors 6502

    Joined:
    Aug 15, 2007
    #5
    That's possible, and I'll give it a try, but that doesn't explain why it would only happen in the one case where the restart is scheduled.

    Cases where it does work:
    -Normal Restart
    -Log out and back in
    -Scheduled Restart, if the user hits restart on the window that says "the computer will restart automatically in 10 minutes if you do nothing."

    Only if you let that countdown run out and the restart happen entirely automatically does it not work.

    Also, I don't think the script is even launching, because when it does, the "current application" in the Menu bar changes to say "Move cursor." That never happens on the scheduled restart.

    Possibly unrelated, but is it bad that it's throwing up errors about not finding a bunch of files? Seems undesirable.
     
  6. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #6
    I was thinking maybe in this one case the system is slower to release control to the UI than the other types of restart? Just an idea.

    On the error messages:

    1. Does /System/Library/StartupItems exist?

    2. I get that one too and it seems harmless.

    3. Did you maybe uninstall Plex and not do a through uninstall. It looks like it is trying to run the Plex client daemon.
     

Share This Page