?
Solved

Schedule a daily shutdown on a slackware box

Posted on 2006-06-21
6
Medium Priority
?
492 Views
Last Modified: 2013-12-16
Hi experts,

i'm working on a mixed network with a file server that us slackware linux (10.2) and some windows based clients.

I need to schedule a daily shutdown of the linux server.
Also, when special needs occurs, i want to cancel the shutdown for a specific day.

I know that this is possible using cron table.

I have a poor knowledge of linux, how can i do this?

Regards.
0
Comment
Question by:balrom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 200 total points
ID: 16949801
As root:

crontab -e

Edit crontab and add:

0 23 * * * /sbin/shutdown -r now

This will reboot the server at 2300 every day. In order to stop it, then just remove the line, and replace it afterwards.

HTH:)



0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16949809
I'm curious however, as to why you would wish to do this, unless you are saving electricity overnight?
0
 

Author Comment

by:balrom
ID: 16950561
Thanks for your post pjedmond.

I hate vi editing style, can i modify the crontab using mc?

P.S.:
The server is used for a few number of hours each day.
doing this, I'm saving energy and the overall lifetime of the server.
But most important, during the silence of night, the server is very noicy (my office has place in a family shared house (condominium).
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
LVL 22

Expert Comment

by:pjedmond
ID: 16951022
You can edit the crontab with any editor you like:

[pje@bigserver root]# VISUAL=/usr/bin/nano
[pje@bigserver root]# export VISUAL
[pje@bigserver root]# crontab -e

if you like namo. I don't use mc, but I guess that it might be possible.

man crontab

for further details.

HTH:)


0
 

Author Comment

by:balrom
ID: 16953522
Thanks a lot  pjedmond.

Your last suggest is working too.

The points are yours.

Regards.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16954142
Obviously

/sbin/shutdown -h now

to make it shut down rather than reboot:)

Thankyou for the points:)
0

Featured Post

Vim Reference Guide

Vim is a powerful text editor favored by many sysadmins and developers - here are some commands that you'll want to keep in your back pocket!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question