This discussion is locked
gvde

Q: When does /etc/daily.local run?

When does a shell script in /etc/daily.local run? I thought it runs at 3:15 AM every day if the computer is on at that time. If it is off, it will run the next time the computer is running. But actually the script (and none of the other /etc/periodic/daily scripts) is never executed.

Can it be that the script only runs delayed if the computer is sleeping and not if it is completely shut down??

iMac, MacBook, Mac OS X (10.5.6)

Posted on Jan 29, 2009 5:24 PM

Close

Q: When does /etc/daily.local run?

  • All replies
  • Helpful answers

Previous Page 2
  • by gvde,

    gvde gvde Jan 30, 2009 4:41 PM in response to V.K.
    Level 1 (10 points)
    Jan 30, 2009 4:41 PM in response to V.K.
    I cannot really change the schedule. It is for a computer which is turn on/off mostly randomly and often only for a short period of time, 2-3 times a week. There is no time at which I can reliable say the computer will be always running at that time.

    I guess I will have to add the script to the shutdown or startup scripts. Does MacOS use launchd instead of /etc/rc* for that, too? Or what would be the place in MacOS to add a shell script during startup or shutdown.
  • by nerowolfe,

    nerowolfe nerowolfe Jan 30, 2009 4:45 PM in response to gvde
    Level 6 (13,065 points)
    Jan 30, 2009 4:45 PM in response to gvde
    gvde wrote:
    I cannot really change the schedule. It is for a computer which is turn on/off mostly randomly and often only for a short period of time, 2-3 times a week. There is no time at which I can reliable say the computer will be always running at that time.


    Then I heartily recommend the Maintidget I mentioned.
  • by V.K.,

    V.K. V.K. Jan 30, 2009 5:02 PM in response to gvde
    Level 9 (56,110 points)
    Jan 30, 2009 5:02 PM in response to gvde
    yes, rc scripts are gonzo in leopard. use launchd. I recommend lingon for that. you can make a launch daemon that will run when any user logs in. make it execute

    periodic daily weekly monthly
  • by Network 23,

    Network 23 Network 23 Jan 30, 2009 7:51 PM in response to nerowolfe
    Level 6 (12,043 points)
    Mac OS X
    Jan 30, 2009 7:51 PM in response to nerowolfe
    nerowolfe wrote:
    You might consider adding the Maintidget widget and run them manually, as I do, if you really want them to run. They are relatively unnecessary, but I run them just the same although not on a regular basis. Just whenever the mood hits me


    This is pretty much how I operate, using Maintidget to monitor whether the scripts have been run. Thanks to another discussion here (I think nerowolfe was one of those who was helpful) I did discover that my desktop, which is often shut down, had not run the scripts in quite a while.

    Yet if I hadn't known that, there's nothing visibly wrong with the machine's operation, and I had been pushing many GB of photos and projects through that Mac for weeks without problems.

    My MacBook Pro, which normally sleeps, never misses the script runs, even when asleep overnight. It seems to work as designed.

    I seriously believe that the importance of these scripts is overstated by many. I feel even more strongly that way after reading Jeffrey Jones2's descriptions of what they do, which was more detailed and helpful than other explanations I've seen.

    Bottom line: If Mac maintenance is a concern, there are more important things to spend our time obsessing over.
Previous Page 2