dubwisedude

Q: Execution of maintenance scripts in Lion

Hi there,

as of the latest update to OS X Lion, the maintenance scripts have ceased to perform automatically.  Before, the scripts executed at their proper times (daily, weekly, monthly) and whenever the computer was running (no need to wait for specific time slots).  I was able to verify the processes via Maintidget, a widget that monitors script activity and can also be used to execute them manually.  As I said, presently there is no more automated script activity - I have to force their execution via Maintidget.  Does anyone has an idea why this should be so?

iMac, Mac OS X (10.7), Lion

Posted on Feb 20, 2012 9:40 AM

Close

Q: Execution of maintenance scripts in Lion

  • All replies
  • Helpful answers

  • by Tony T1,

    Tony T1 Tony T1 Feb 20, 2012 9:52 AM in response to dubwisedude
    Level 6 (9,249 points)
    Mac OS X
    Feb 20, 2012 9:52 AM in response to dubwisedude

    I believe that they're set to run at 3:15am and 5:15am by the OS, (not sure if they will run when your Mac is turned on if you have if off at that time)

  • by thomas_r.,

    thomas_r. thomas_r. Feb 20, 2012 10:02 AM in response to dubwisedude
    Level 7 (30,944 points)
    Mac OS X
    Feb 20, 2012 10:02 AM in response to dubwisedude

    If you are putting your machine to sleep at night, when they would normally run, they should run at the next available opportunity.  However, note that those scripts are almost completely useless except for very niche purposes on a modern Mac.  For more information, see:

     

    https://discussions.apple.com/message/8906776#8906776

  • by dubwisedude,

    dubwisedude dubwisedude Feb 20, 2012 10:04 AM in response to Tony T1
    Level 1 (5 points)
    Mac OS X
    Feb 20, 2012 10:04 AM in response to Tony T1

    Hi Tony,

    the discussion of the timed maintenance is an old one and does no longer apply.  Since I have this Imac (2009), the scripts executed whenever the machine ran, independent of designated time slots.  While it is true that, in the past and with certain os, maintenance scripts ran at special times only, Apple has since changed their behaviour to facilitate a steady and regular automated maintenance.  In may case and, as I said, since the latest complementary update to Lion, the scripts have ceased to perform altogether unless forced via Maintidget. 

    Any other idea anybody?   

  • by macjack,Helpful

    macjack macjack Feb 20, 2012 10:11 AM in response to dubwisedude
    Level 9 (55,709 points)
    Mac OS X
    Feb 20, 2012 10:11 AM in response to dubwisedude

    Are you sure they didn't execute or are you taking the widget's word for it. Rather than assume, it's not happening because a widget reports it, I'd tend to assume the widget is incorrect. When was the last time you updated the widget. Those scripts are now handled by a different process in the directory structure, if memory serves me.

     

    EDIT:

    You can see exactly what each script is doing and when, by looking in Console > daily.out, monthly.out and weekly.out.

    My weekly & daily executed today

  • by thomas_r.,Helpful

    thomas_r. thomas_r. Feb 20, 2012 10:12 AM in response to dubwisedude
    Level 7 (30,944 points)
    Mac OS X
    Feb 20, 2012 10:12 AM in response to dubwisedude

    the discussion of the timed maintenance is an old one and does no longer apply.

     

    Sure it does.  Those scripts are ancient carry-overs from the early days of Unix and have not been changed much since then.

     

    Also, macjack has a good point.  Verify what the widget is telling you.  Paste the following command into the Terminal to find out when they last ran:

     

    ls -al /var/log/*.out

     

    The output on my machine is:

     

    Hyperion:~ thomas$ ls -al /var/log/*.out

    -rw-r--r--  1 root  wheel  355773 Feb 20 06:05 /var/log/daily.out

    -rw-r--r--  1 root  wheel    1352 Feb  1 06:07 /var/log/monthly.out

    -rw-r--r--  1 root  wheel    2697 Feb 18 09:31 /var/log/weekly.out

  • by dubwisedude,

    dubwisedude dubwisedude Feb 20, 2012 10:15 AM in response to macjack
    Level 1 (5 points)
    Mac OS X
    Feb 20, 2012 10:15 AM in response to macjack

    Hey mcjack,

    you may have a point there.  Maintidget's latest release dates from March 2010 and the developer admitted that incompatibility problems with Lion have occurred recently.  However, I can execute the scripts manually from Maintidget.  Any other suggestion for monitoring and verifying the scripts' activity?

  • by dubwisedude,

    dubwisedude dubwisedude Feb 20, 2012 10:20 AM in response to thomas_r.
    Level 1 (5 points)
    Mac OS X
    Feb 20, 2012 10:20 AM in response to thomas_r.

    Hi Thomas,

    I applied the command - the result agrees with the display of Maintidget, that is with the scripts I forced manually.

  • by thomas_r.,

    thomas_r. thomas_r. Feb 20, 2012 10:29 AM in response to dubwisedude
    Level 7 (30,944 points)
    Mac OS X
    Feb 20, 2012 10:29 AM in response to dubwisedude

    If your machine is turned off at night, that's why.  Do you put it to sleep or shut it down overnight?  Putting it to sleep should allow those scripts to run at the first opportunity after they were scheduled to run.

     

    If you're dead-set on forcing these scripts to run, and they aren't doing so automatically for some reason, just run these three commands in the Terminal every now and then:

     

    sudo periodic daily

    sudo periodic weekly

    sudo periodic monthly

     

    Note that you do not need to do that very often, since they do not have a particularly important purpose anymore.

  • by macjack,

    macjack macjack Feb 20, 2012 10:36 AM in response to dubwisedude
    Level 9 (55,709 points)
    Mac OS X
    Feb 20, 2012 10:36 AM in response to dubwisedude

    There is a Shakespeare Comedy titled, Much Ado About Nothing.

    That pretty much sums up the discussion of periodic scripts

  • by dubwisedude,

    dubwisedude dubwisedude Feb 20, 2012 10:37 AM in response to thomas_r.
    Level 1 (5 points)
    Mac OS X
    Feb 20, 2012 10:37 AM in response to thomas_r.

    I turn the machine off because putting it to sleep only at night caused me another problem in the past.  I sure can run the scripts manually, but my main point is that they performed in the past whenever the machine was running and independent of time slots.  The daily script performed when I opened the machine in the morning, the weekly and the monthly likewise whenever their time had come.  Now, nothing happens anymore unless I force the scripts manually.  I'll keep observing this...

  • by Courcoul,

    Courcoul Feb 20, 2012 10:43 AM in response to dubwisedude
    Level 6 (14,193 points)
    Feb 20, 2012 10:43 AM in response to dubwisedude

    I hate widgets doing their evil stuff and consuming resources behind my back. Hence, my Dashboard is quite sparsely populated. As for the scripts in modern Lion days, they seem to run when they're supposed to without having to depend on the Mac being turned on at ungodly hours before dawn. I use Onyx to either run them or verify that they ran (amongst other things).

  • by AMCarter3,

    AMCarter3 AMCarter3 Mar 22, 2012 3:04 PM in response to dubwisedude
    Level 1 (31 points)
    Mac OS X
    Mar 22, 2012 3:04 PM in response to dubwisedude

    Anyone still running Macaroni (the aging 32 bit utility from Atomic Bird that automatically ran all 3 cron scripts at night plus repaired permissions and cleaned out the mounds of "localized language files" that so many apps install?