Solved

Cron jobs

Posted on 2002-06-06
2
272 Views
Last Modified: 2010-04-20
I want to reboot the services of Redhat 7.2 every 6:00a.m. How can I setup the crontab?
0
Comment
Question by:kennycpu
2 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7058725
to edit the crontab (as user of your choice):

   crontab -e

here you simply add the command to "reboot the service"

For details see
   man crontab
   man 5 crontab
0
 
LVL 1

Accepted Solution

by:
websolution earned 50 total points
ID: 7065979
boot as root
run:
crontab -e

usually crontab use vi
so press: <$> then <G> to go to the last line
press <o> to open a new line under the last line

enter:
0 6 * * * /sbin/reboot

press <ESC> key to return to the editor command mode

to save it, enter:
:wq

that's it.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now