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

UNIX scripts when computer sleeps

Message #1 - Posted 2005/11/22 - Hans Aberg

One can use 'cron' to automate scripts, but it does not work if the computer sleeps in the designated crontab minute. Then there are two alternatives, I would want to do: First, run the script when the computer wakes up, as a delayed script. Second, wake up the computer and run the script in the designated minute. Can any, or both, of these alternatives be achieved?

Hans Aberg

Message #2 - Posted 2005/11/22 - Tom Stiller

Previously, Hans Aberg wrote:

One can use 'cron' to automate scripts, but it does not work if the computer sleeps in the designated crontab minute. Then there are two alternatives, I would want to do: First, run the script when the computer wakes up, as a delayed script. Second, wake up the computer and run the script in the designated minute. Can any, or both, of these alternatives be achieved?

Check out anacron, available via fink or VersionTracker.

Tom Stiller

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

Message #3 - Posted 2005/11/23 - Donald Hall

Previously, Hans Aberg wrote:

One can use 'cron' to automate scripts, but it does not work if the computer sleeps in the designated crontab minute. Then there are two alternatives, I would want to do: First, run the script when the computer wakes up, as a delayed script. Second, wake up the computer and run the script in the designated minute. Can any, or both, of these alternatives be achieved?

Hans,

Take a look at Script Timer, a little application that I publish. It can schedule scripts (AppleScript, perl, and shell scripts) to run when the computer wakes from sleep.

There are also ways to wake the computer - including once per day with the Energy Saver preferences pane.

Don

Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
http://www.appsandmore.com don at appsandmore dot com
"Schedule your scripts with Script Timer"

Message #4 - Posted 2005/11/23 - Hans Aberg

Previously, Donald Hall wrote:

One can use 'cron' to automate scripts, but it does not work if the computer sleeps in the designated crontab minute. Then there are two alternatives, I would want to do: First, run the script when the computer wakes up, as a delayed script. Second, wake up the computer and run the script in the designated minute. Can any, or both, of these alternatives be achieved?

Take a look at Script Timer, a little application that I publish. It can schedule scripts (AppleScript, perl, and shell scripts) to run when the computer wakes from sleep.

If you want to place an ad for your product, perhaps you should add a link. :-) -- Even though it was easy to net-search find it.

There are also ways to wake the computer - including once per day with the Energy Saver preferences pane.

Thank you for the suggestion. If one has a daily cron script, this way, one can make sure the computer is awake in the crontab line minute.

Hans Aberg

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.