LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-20-2008, 03:47 AM   #1
dopla
Member
 
Registered: Aug 2008
Location: Beacon Bay, East London, South Africa
Distribution: Ubuntu
Posts: 30

Rep: Reputation: 16
Scheduled Laptop Startup and Shutdown on Ubuntu Hardy


I've seen this feature in practice on Apple MacBook Pro (Mac OS X) and wondered how it could be done on linux.

I want to my machine to shutdown automatically everyday at, say, 12 midnight and start up automatically at, say, 6:00am. I think the shutdown could be done by sceduling the "shutdown/halt" command via (ana)cron but what about start up?
 
Old 10-20-2008, 08:52 AM   #2
cgtueno
Member
 
Registered: Jul 2003
Posts: 363

Rep: Reputation: 50
October 21,2008 Aus

Hi


Part A : Daily system shutdown

The scheduled shutdown activity can be set up using cron and a script.
There is plenty of information about how to use cron in man, in books, and on the www.

1) create a suitable exit script ending with the command
$shutdown -h now

2) create a cron schedule entry for a daily execution of the exit script at the desired time.

3) restart cron


Part B : Daily system start up

This usually setup by configuring a system's BIOS.
Modern PCs often have the facility to setup a PC to start up at a desired time of day. (eg. Dell PCs)


Notes:

(i)The above Part B suggestion assumes that you are using a fairly recent PC with an ATX type (or proprietary equivalent) PSU, and not an AT type PSU.

If you are using a PC with an AT type PSU (or equivalent) and a DPDT switch, then there is another approach you can try for a timed system power up. Leave the PC power switch in the "ON" position
Use an external AC mains timer to apply power to the system at the desired time.

(ii)Note that while this works it can also be a safety hazard. When working on the PC disconnect the AC mains timer to ensure that the machine does
not startup while you are performing any kind of (power off) maintenance on it. Use common sense and caution.

(iii)Be careful about the physical installation and physical condition of any PC that you set up for unattended timed power up. After all you don't want a fire, or other problems.


Hope that helps.

Regards

Chris

Last edited by cgtueno; 10-20-2008 at 08:53 AM. Reason: typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Ubuntu hardy is very slow at startup welder_tim Linux - Desktop 1 08-07-2008 06:44 PM
laptop shutdown while compiling kernel in Ubuntu 6.06 eye2eye Ubuntu 8 07-25-2007 10:28 PM
Scheduled shutdown scherfistv Linux - General 2 07-12-2006 12:43 AM
My Ubuntu on laptop won't shutdown openfun Ubuntu 8 07-17-2005 03:19 PM
Scheduled shutdown? Devils_Knight Linux - Software 14 02-02-2005 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:39 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