LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 04-29-2009, 11:14 AM   #1
drsethi
Member
 
Registered: Jun 2006
Location: Amritsar
Distribution: SuSE 11.1
Posts: 55

Rep: Reputation: 15
Howto schedule shutdown daily


I want to schedule shutdown my computer daily at 08:00:01 AM.
Describe the method with Kcron or any other software
 
Old 04-29-2009, 12:26 PM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,373

Rep: Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911Reputation: 1911
You can easily set up a crontab to do the job. Open a terminal and switch to root (since only root can use the shutdown command):
Code:
su -
then edit the root's crontab using
Code:
crontab -e
now you are into the vi editor. Add the following line:
Code:
0 8 * * * /sbin/shutdown -h now
save and quit and the trick is done. If you don't know how to use the vi editor, just press "a" to insert new text, type the text (the above line) then press "Esc". To save and quit digit ":wq!", then press enter. If you prefer to use a graphical editor, just set the environment variable EDITOR to the name of your favorite editor, for example:
Code:
export EDITOR=kwrite
then issue the crontab -e command. This time a session of kwrite pops up. Put the same crontab entry, save an quit.

About using kcron, you can find instructions here.
 
  


Reply

Tags
schedule, shutdown


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Schedule a command for twice daily with cron? pdeman2 Linux - Software 7 04-23-2013 05:47 PM
LXer: Schedule Tasks Using Gnome-schedule (cron & at GUI) LXer Syndicated Linux News 0 07-28-2007 12:31 AM
schedule a shutdown Mow Linux - Server 2 03-05-2007 08:29 AM
Graceful shutdown.. howto? rohan208 Linux - General 5 05-16-2004 02:39 PM
how do i schedule events to run daily. ThaddNZ2003 Linux - General 2 03-10-2003 10:59 AM


All times are GMT -5. The time now is 01:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration