The conversation on this page has been archived and is no longer active.

Can cron work during sleep?

Message #1 - Posted 2002/03/11 - Stan Randle

Can cron perform scheduled updates while a Mac is in sleep?

Message #2 - Posted 2002/03/11 - Tom Stiller

Previously, Stan Randle wrote:

Can cron perform scheduled updates while a Mac is in sleep?

Not if the processor is sleeping. You might try anacron (easily available via fink) which attempts to "catch-up" on tasks whose execution is past-due.

Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF

Message #3 - Posted 2002/03/11 - matt neuburg

Previously, Tom Stiller wrote:

Previously, Stan Randle wrote:

Can cron perform scheduled updates while a Mac is in sleep?

Not if the processor is sleeping

That's the conventional wisdom, but I wonder whether it's still true. I always put the computer to sleep manually every night, but since installing 10.1.3 I've noticed that my computer is awake in the morning, and that my logs are being rotated weekly. m.

matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt *** REALbasic: The Definitive Guide! 2nd edition! ***
http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt

Message #4 - Posted 2002/03/12 - Adriaan Tijsseling

Previously, matt neuburg wrote:

Previously, Tom Stiller wrote:

Previously, Stan Randle wrote:

Can cron perform scheduled updates while a Mac is in sleep?

Not if the processor is sleeping

That's the conventional wisdom, but I wonder whether it's still true. I always put the computer to sleep manually every night, but since installing 10.1.3 I've noticed that my computer is awake in the morning, and that my logs are being rotated weekly. m.

If you go to the Energy saver and click the Options tab, you will notice an option "Wake for network administrative access". If that is on, cron will work if the computer is asleep. Otherwise, not.

Adriaan

__________________________________________________________ email: adriaan + tijsseling . com
x: http://www.kung-foo.tv/xtips.shtml __________________________________________________________

Message #5 - Posted 2002/03/11 - Tom Harrington

Previously, matt neuburg wrote:

Previously, Tom Stiller wrote:

Previously, Stan Randle wrote:

Can cron perform scheduled updates while a Mac is in sleep?

Not if the processor is sleeping

That's the conventional wisdom, but I wonder whether it's still true. I always put the computer to sleep manually every night, but since installing 10.1.3 I've noticed that my computer is awake in the morning, and that my logs are being rotated weekly. m.

Easy enough to discover; look in /var/log/system.log for entries tagged as "CRON".

Tom Harrington -- tph (at) pcisys (dot) net
"And you may ask yourself,
well, how did I get there?"
-- Talking Heads

Message #6 - Posted 2002/03/12 - matt neuburg

Previously, Adriaan Tijsseling wrote:

Previously, matt neuburg wrote:

Previously, Tom Stiller wrote:

Previously, Stan Randle wrote:

Can cron perform scheduled updates while a Mac is in sleep?

Not if the processor is sleeping

That's the conventional wisdom, but I wonder whether it's still true. I always put the computer to sleep manually every night, but since installing 10.1.3 I've noticed that my computer is awake in the morning, and that my logs are being rotated weekly. m.

If you go to the Energy saver and click the Options tab, you will notice an option "Wake for network administrative access". If that is on, cron will work if the computer is asleep. Otherwise, not.

Mine is not on and never has been, so that can't be the correct explanation. m.

matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt *** REALbasic: The Definitive Guide! 2nd edition! ***
http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt

Message #7 - Posted 2002/03/12 - Tom Stiller

Previously, matt neuburg wrote:

Previously, Tom Stiller wrote:

Previously, Stan Randle wrote:

Can cron perform scheduled updates while a Mac is in sleep?

Not if the processor is sleeping

That's the conventional wisdom, but I wonder whether it's still true. I always put the computer to sleep manually every night, but since installing 10.1.3 I've noticed that my computer is awake in the morning, and that my logs are being rotated weekly. m.

My system sleeps through the night; as always, your milage may vary.

Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF

Message #8 - Posted 2002/03/12 - Bird

Previously, matt neuburg wrote:

Previously, Adriaan Tijsseling wrote:

If you go to the Energy saver and click the Options tab, you will notice an option "Wake for network administrative access". If that is on, cron will work if the computer is asleep. Otherwise, not.

Mine is not on and never has been, so that can't be the correct explanation. m.

I tried the above option lasts night, but my computer seems to have slept through the night. The logs show no changes.

Bird

Message #9 - Posted 2002/03/12 - Neill Massello

Stan Randle wrote:

Can cron perform scheduled updates while a Mac is in sleep?

A Mac can't really do anything ~while~ it is in deep sleep; it must first wake up. The only thing that can wake a sleeping Mac is the PMU (Power Management Unit), which is more than your average power switch. Here's the description of the PMU from the Apple KB article about resetting it:

"The PMU (Power Management Unit) is a microcontroller chip that controls all power functions for the computer. The PMU is a computer within a computer. It has memory, software, firmware, I/O, two crystals, and a CPU. Its functions is to:
* Tell the computer to turn on, turn off, sleep, wake, idle, etc. * Manage system resets from various commands.
* Maintain parameter RAM (PRAM).
* Manage the real-time clock."

A Mac's PMU only wakes when it detects signals -- and I don't know how discriminating it is about parsing those signals -- on particular ports or when the clock reaches a particular time. Setting startup and shutdown times was an option in the OS 9 Energy Saver but no longer appears in the current OS X System Preferences. All processes running on the CPU are put into "suspended animation" when a Mac goes into deep sleep: the only processes active during deep sleep are those running on the PMU's processor. As a UNIX daemon that knows nothing of the Mac PMU, cron doesn't register a wake time with the PMU, and the Mac sleeps through the times appointed for the cron jobs.

In my experience, the cron jobs don't take long and don't disrupt normal work while they're running anyway, so they can be rescheduled to run at any time of day that your Mac is most likely to be on and awake. I rescheduled them to run in the late afternoon using the freeware app CronniX.

Message #10 - Posted 2002/03/12 - Chip Zempel

Previously, matt neuburg wrote:

If you go to the Energy saver and click the Options tab, you will notice an option "Wake for network administrative access". If that is on, cron will work if the computer is asleep. Otherwise, not.

Mine is not on and never has been, so that can't be the correct explanation. m.

According to David Pogue's "Mac OS X: The MIssing Manual" this option only applies to OS X Server.

Chip

Message #11 - Posted 2002/03/19 - Peter Sealy

Previously, matt@tidbits.com (matt neuburg) wrote:
snip

If you go to the Energy saver and click the Options tab, you will notice an option "Wake for network administrative access". If that is on, cron will work if the computer is asleep. Otherwise, not.

Mine is not on and never has been, so that can't be the correct explanation. m.

BWG3s do not have the Options tab in the Energy Saver for X. Don't know why, does anyone?

Peter Sealy

Lavington AUSTRALIA

Message #12 - Posted 2002/03/19 - D A Vincent

Peter Sealy <pandcsealy@hotkey.net.au> writes:

Previously, matt@tidbits.com (matt neuburg) wrote:
snip

If you go to the Energy saver and click the Options tab, you will notice an option "Wake for network administrative access". If that is on, cron will work if the computer is asleep. Otherwise, not.

[...]

BWG3s do not have the Options tab in the Energy Saver for X. Don't know why, does anyone?

I'll take a wild guess that the Blue & White G3 hardware does not support the features under the Options tab, such as waking for network admin access.

d.

Need Help? Have a Question?

Looking for more help, comments, and answers?

Ask your questions on Ask Different. Ask Different is a community of Apple users ready to help.