Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-11-2004, 04:50 PM
|
#1
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Rep:
|
Running a program automatically by the clock?
I run a RH9-based text-only server and I wanna run chkrootkit every now and then automatically. The program basically checks for worms and traces of aliens trying to gain root access of the server. How would I be able to make my server automatically take this into action at power-on? I would like it to run the program every hour, day, or something like that.
Thanks!
|
|
|
07-11-2004, 04:51 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
use cron
|
|
|
07-11-2004, 05:11 PM
|
#3
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Original Poster
Rep:
|
Okay, I man paged it and googled it, then added this to my crontab:
0 * * * * root /usr/src/chkrootkit*/chkrootkit
How's this look? If I did it correctly, it should be set to run every hour.
How can I make crond pick up on this addition to the configuration? Is there a way I can restart it or does it just figure it out on its own?
|
|
|
07-11-2004, 09:41 PM
|
#4
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep: 
|
1. "Cron" should figure it out on its own.
2. Typically the easiest way to update the crontab (on a per-user basis) is:
a) Log in (or "su") to the user meant to execute the cron job
b) "crontab -e" to edit the file
Anyway, it looks like your syntax is correct, and that it should work as you expect.
Your .. PSM
|
|
|
07-12-2004, 05:38 AM
|
#5
|
Member
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834
Original Poster
Rep:
|
Nice! It works great! Thanks all!
|
|
|
All times are GMT -5. The time now is 07:33 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|