Solved

Cron jobs

Posted on 2002-06-06
2
304 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
[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
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…

724 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