Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Shrink

macrumors G3
Original poster
Feb 26, 2011
8,929
1,727
New England, USA
Background: Before I am (appropriately)scolded for not doing my homework - I have done a search in MR and read the threads addressing this issue. I have also read responses on other forums (forae?) addressing my question. In all cases, the answers have been inconsistent. (I have also read Mac information on this issue)

What is known definitively:
1) The maintenance scripts run between (about) 3:15AM and 5:30AM.
2) If the computer is awake (not in sleep mode) the scripts will run during the designated time period.
3) If the computer is shut down, the scripts will not run.
4) The scripts can be run manually.

Points of disagreement:
1) Some say that if the computer is in sleep mode, the scripts will activate into a standby mode, and the scripts WILL RUN when the computer is awakened.
2) Some say that being in sleep mode is equivalent to being shut down, and the scripts will NOT run.

My question: which of the two points above are correct.

I don't wish to be rude, but I am not looking for opinions. I am, if possible, looking for authoritative responses backed empirically.

Thank you, in advance, for your responses (if I get any responses after my snotty little statement above ;):p)
 
Last edited:
63 views - no replies. :(

I guess my snotty little remark about "opinions" didn't exactly do me any good in getting replies. :eek: Not a good move on my part.

Replies or no replies - if I offended anyone, my apologies.

No offense meant... :eek:
 
Check the logs. I'm not sure which ones (but I'm sure someone else can help).

If the scripts run, there will be a log entry. Then you can set up a series of experiments and get the empirical evidence - and be the one to post the "...just the facts, ma'am."

Also - your post title isn't helping the cause. Try something like "Do Maintenance Scripts Run When Sleeping?" In my opinion you'll get more answers. I thought this thread going to be the tired old "How do I run? You don't have to run!" debate.

Good Luck
 
Thanks much for the suggestions - especially about my Title. I'll change it now.
The logs would be all the empirical evidence I need.

Thanks again...;)
 
They won't. Period.

Not to be blunt - but you're wrong. ;)

If you check the logs you find that the scripts run upon waking up the computer, at least if it is sleeping during the designated time period.

I use a widget (thanks, GGJstudios) called Maintidget which shows the time and date of the past script run. It shows the daily scripts running at the time I woke up the computer, same for weekly and monthly scripts. Haven't tried to see if scripts run if computer is shut down overnight. (I don't shut down overnight)

Also, the widget will manually run scripts, if you feel the need.
 
Last edited:
In my experiences using Onyx, I've noticed that it says my daily scripts have run at the moment when my computer wakes from sleep if it hasn't been awake at the designated time.
 
Not to be blunt - but you're wrong. ;)
As you've discovered, scripts won't run while the computer is in sleep mode or shut down (nothing runs in that state), but they will run the next time the system is up. This is confirmed.
 
Not to be blunt - but you're wrong. ;)

Apple used to use the Unix cron framework, I believe, to do this stuff, and the problem was that notebooks (especially) which were asleep would never run the daily/weekly/monthly scripts. At several points, they modified their cron implementations (I think this was about 4-5 years ago) and went from cron to a new framework called launchd (see link). I'm pretty sure that, ever since at least 10.4 and launchd, these scripts get run on/around wake from sleep if they were "skipped" over.

I think what the other person was responding to was the question of whether the computer will wake itself up to run scripts. I don't think that happens -- just that the scripts don't get skipped because, say, the script is supposed to run at 12:00 and the computer is asleep from 10:00 till 9:00 the next morning.
 
As you've discovered, scripts won't run while the computer is in sleep mode or shut down (nothing runs in that state), but they will run the next time the system is up. This is confirmed.

Absolutely! I remember a discussion like this a couple of years ago so I installed a dashboard widget just to see for myself. They run as soon as your computer wakes. ;)
 
Background: Before I am (appropriately)scolded for not doing my homework - I have done a search in MR and read the threads addressing this issue. I have also read responses on other forums (forae?) addressing my question. In all cases, the answers have been inconsistent. (I have also read Mac information on this issue)

What is known definitively:
1) The maintenance scripts run between (about) 3:15AM and 5:30AM.
2) If the computer is awake (not in sleep mode) the scripts will run during the designated time period.
3) If the computer is shut down, the scripts will not run.
4) The scripts can be run manually.

Points of disagreement:
1) Some say that if the computer is in sleep mode, the scripts will activate into a standby mode, and the scripts WILL RUN when the computer is awakened.
2) Some say that being in sleep mode is equivalent to being shut down, and the scripts will NOT run.

My question: which of the two points above are correct.

I don't wish to be rude, but I am not looking for opinions. I am, if possible, looking for authoritative responses backed empirically.

Thank you, in advance, for your responses (if I get any responses after my snotty little statement above ;):p)

Both are wrong. A shutdown is a full system halt, everything is unmounted, all process PID's are killed if they are still valid after the system calls for halt.

Sleeping your mac, is the same (but a hell of alot faster) then sleeping a windows machine. It snapshots your machines current state and reloads it when you open your macbook lid or hit the enter key.

So to sum up this entire thread, no scripts will not run IN sleep state, and NO, sleeping a mac is NOT the same as shutting it down.

EDIT: RETRACTED FOR MISREAD
 
Last edited:
Sorry, but your the one wrong here. You just said "the scripts run upon waking up the computer", it's in wake state not sleep state.
You misread the statement. They mean that after the computer wakes, the scripts run.
 
Not to be blunt - but you're wrong. ;)

If you check the logs you find that the scripts run upon waking up the computer, at least if it is sleeping during the designated time period.

Which means, they are postponed until the computer wakes up. Which, in turn, means they are not running when the computer is sleeping. Which means they do not run and I am right. Which means you're wrong but i do not expect you to admit it - not to be blunt.

Haven't tried to see if scripts run if computer is shut down overnight.

You must be kidding me. Scripts running with the computer shut down. I think you have no bloody idea what you're talking about, but next time try to check if they run when you disconnect the mains power cable from the computer. AND remove the battery.
 
Which means, they are postponed until the computer wakes up. Which, in turn, means they are not running when the computer is sleeping. Which means they do not run and I am right. Which means you're wrong but i do not expect you to admit it - not to be blunt.



You must be kidding me. Scripts running with the computer shut down. I think you have no bloody idea what you're talking about, but next time try to check if they run when you disconnect the mains power cable from the computer. AND remove the battery.

You are , of course, right when you say the scripts don't run during sleep. I believe you will note in an earlier post that I said the scripts run upon waking up the computer, not during sleep. I used some dopey phrase like being in "standby mode until awakening."

Sorry you took such strong offense. I'm happy to admit when I'm wrong - god knows it happens often enough.
 
No need to apologize, as no offense taken - I just love the british way of forum chatting which includes calling everyone else "idiot" etc.
I think what we've encountered is a classical case of need for precision when using terms "sleeping", "waking" etc - obviously, the scripts themselves do not run, however the clock still works - hence the scripts run after the computer wakes up.

Cheers,
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.