Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-15-2011, 06:58 AM   #1
Registered: Oct 2011
Posts: 164

Rep: Reputation: Disabled
command to reboot system at specific time

Im making out shell scripts to reboot my server every day and moving logs backup using remote drive .can someone tell me what command let me use to reboot my system on specific system is not reboot as first following shell scripts is not working off...

date=`/bin/date "+%Y.%m.%d.%H.%M.%S"`
tar -xvf /bkup/$date.tar /opt/apps/tomcat/apache-tomcat-6.0.26/logs/
mail -s $date <<EOF
Backup Completed Successfully

Last edited by sanjay87; 11-15-2011 at 07:05 AM.
Old 11-15-2011, 07:22 AM   #2
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,451

Rep: Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891Reputation: 891
shutdown -r now
Old 11-15-2011, 07:47 AM   #3
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
Read up on "cron" to schedule tasks.
While your at it, read up on tar.
tar -xvf will verbosely extract files from /bkup/$date.tar. It doesn't sound like this is what you want to do.

Why on earth would you want to reboot a Linux web server every day? How very windows of you...


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
[SOLVED] How to run a program for a specific amount of time starting at a specific time? thiemster Linux - Newbie 12 05-18-2010 09:04 AM
Command or grep to know system reboot time rockcharles1 Linux - General 2 10-05-2007 03:49 PM
Why does my system reboot every time i try.... Hdstdlxe Linux - Newbie 9 10-22-2005 04:31 AM
Only starting command in a specific time period jeroenvrp Linux - Software 3 07-20-2004 11:18 PM
Giving Specific users access to the reboot command shassouneh Linux - Security 15 03-24-2004 05:10 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:37 AM.

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