What exactly is being done to my Mac at midnight?

Discussion in 'macOS' started by fs454, Jul 25, 2009.

  1. fs454 macrumors 65816

    Joined:
    Dec 7, 2007
    Location:
    Los Angeles / Boston
    #1
    On my early '08 Octo Mac Pro, and I'm assuming every OS X machine, at midnight I hear my hard drives spin into action and presumably a bunch of maintenance is being done each night. This usually lasts for about 5 minutes.


    Question is, what exactly is it doing?
     
  2. r.j.s Moderator emeritus

    r.j.s

    Joined:
    Mar 7, 2007
    Location:
    Texas
    #2
    Don't know why yours would run at midnight, but here:

    # The daily script removes old log files, "scratch" and "junk" files, backs-up the NetInfo database (Mac OS X 10.4 Tiger® and earlier), reports a variety of system and network statistics, and rotates the system.log file. Under Tiger, the daily script also cleans up scratch fax files and prunes asl.log, the log file for the then-new Apple System Logging facility. Under Mac OS X 10.5 Leopard®, the daily script also prunes the asl.db file that replaced the asl.log file for Apple System Logging.

    # The output from the daily script is written to the /var/log/daily.out file, which can be viewed in Console.

    # By default, the daily script is scheduled to run daily at 03:15 hours local time.
     
  3. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #3
    There are a series of scripts that run. One is scheduled to run daily, another to run weekly, and another to run monthly.

    Guess what happens if your Mac is not on when these scripts are scheduled to run? Nothing. The scripts never run unless the Mac is on the at the time they are scheduled to run.

    This is one reason why I use Macaroni. If the Mac is not on when the a script is scheduled to run, Macaroni runs it the next time the Mac is powered on. Another reason is that Macaroni makes it easy for me to run my own scripts too.

    S-
     
  4. J the Ninja macrumors 68000

    Joined:
    Jul 14, 2008
    #4
    Not anymore. Leopard's launchd is smart enough to note when a script got missed due to downtime, and will run them on the fly.
     
  5. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #5
    J the Ninja,

    Maybe they are supposed to run, but it appears that this is not true in all cases. That was not the case with my system when it it was running 10.5.6.

    S-
     
  6. J the Ninja macrumors 68000

    Joined:
    Jul 14, 2008
    #6
    Shut down or sleep? I always sleep my Mac at night, and have never had a problem with them not running on the fly in the morning. Maybe launchd can't watch for shut down/restart like it can for sleep, since it has to shut down itself?
     

Share This Page