LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 02-12-2017, 05:02 AM   #1
Märk Owen
LQ Newbie
 
Registered: Nov 2014
Posts: 22

Rep: Reputation: Disabled
Wake up from suspend to run cron job


Hello,

I'm running Debian Jessie (with systemd) on a couple of laptops and I would like them to wake up from their suspend-to-memory states during the night to run a cron job but I don't know how to go about it.

I know about rtcwake but it needs to be the one from which the suspended state originates which isn't what I want. My users send their laptops to sleep and I want the machines to wake up without human intervention.

Any ideas? Thanks!
 
Old 02-12-2017, 06:36 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,661

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
Quote:
Originally Posted by Märk Owen View Post
Hello,

I'm running Debian Jessie (with systemd) on a couple of laptops and I would like them to wake up from their suspend-to-memory states during the night to run a cron job but I don't know how to go about it.

I know about rtcwake but it needs to be the one from which the suspended state originates which isn't what I want. My users send their laptops to sleep and I want the machines to wake up without human intervention.

Any ideas? Thanks!
I would set a cron job (using absolute time) on the laptops, and run a job on a server (that does NOT suspend) to poll and wake them using WOL (Wake On Lan). I am not sure that there is not a better way, but on my network that would be fast and easy to set up.

Just out of curiosity, why do you need the laptops to waken in the night?
 
Old 02-12-2017, 07:08 AM   #3
Märk Owen
LQ Newbie
 
Registered: Nov 2014
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Just out of curiosity, why do you need the laptops to waken in the night?
To shut them down. I know it might be a weird request but since these two laptops belong to non techy-users, I KNOW it's gonna fly over their heads if I ask them to shutdown their computers at night.

Thank you for your reply. I'll check and see if these laptops support WOL. The good thing is that I have a server of mine running in the same network.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run cron job in every 20 second ust Linux - Newbie 13 01-15-2015 01:01 PM
Debian daily cron job won't run, but does run in cron.hourly. sandersch Linux - General 7 05-24-2012 01:50 AM
cron job and apm suspend linuxhippy Slackware 7 01-20-2007 06:43 AM
how to run this cron job ashley75 Linux - General 5 05-24-2004 11:20 AM
Cron job does not run brentos Linux - General 6 12-12-2003 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration