Wake Your Linux Up From Sleep for a Cron Job
Dec 10, 2010, 01:34 (0 Talkback[s])
WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
"Here's the latest in our new series on OS tips from power
users: a seemingly trivial task. You have a computer, most likely a
laptop, that you wish to keep suspended while you're not working.
For example, let's say overnight. At the same time, you wish to run
a handful of maintenance tasks, like backups and cleanup, which you
don't normally do during the day. So you need a mechanism that will
send your machine to sleep, wake it up when necessary, run cron
jobs, then send it back to sleep again.
"Possible? Well, if it weren't, I would not be writing this
tutorial, but it definitely is not trivial. In this tutorial, I
will show you how you can do this, in a relatively simple and safe
manner. We will check the requirements for the task. We will
examine a typical use case. We will discuss the many small-print
items revolving around this idea, e.g. why you need to be extra
careful with waking from sleep for cron jobs. And we'll do a few
other things, besides."