Red Hat This forum is for the discussion of Red Hat Linux. |
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.
|
|
03-02-2007, 12:45 PM
|
#1
|
Member
Registered: Jun 2006
Posts: 132
Rep:
|
change cron.daily run time
hi,
I have a scrpit in /etc/logroate.d, and it runs daily, how can I set the time it runs, that mean I have to change the cron.daily run time right? ( I don't want it run in crontab )
thanks!
jimmy
|
|
|
03-02-2007, 01:36 PM
|
#2
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Maybe this article may help you.
|
|
|
03-02-2007, 02:10 PM
|
#3
|
Member
Registered: Jun 2006
Posts: 132
Original Poster
Rep:
|
I can't find /var/spool/cron/lastrun/cron.daily at my redhat as 4,but I do find /etc/crontab ,I can edit start time there, but for detail to very script inside cron.daily.
thanks!
|
|
|
03-02-2007, 02:31 PM
|
#4
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560
Rep:
|
SUSE has a slightly different setup than RedHat for cron jobs. I would point you to the RedHat docs, but for some reason the documentation is temporarily unavailable. The file /etc/crontab controls execution of system jobs. To understand the layout of the crontab file you should look at the man pages on crontab. Be sure to read both sections 1 and 5 to understand how it works. Individual users can also have their own crontab file depending on settings.
The files in /etc/logrotate.d are not scripts they are configuration files for logrotate. The actual logrotate script is in /etc/cron.daily. Note that if you change the runtime for /etc/cron.daily you are also going to change the runtime for the other scripts in that directory.
Bill
ps - Jimmy you should set your Distribution in your profile. Go to My LQ at the top of the page to get to your profile.
Last edited by wmakowski; 03-02-2007 at 02:33 PM.
|
|
|
03-02-2007, 02:35 PM
|
#5
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560
Rep:
|
Looks like you were posting when I was writing. The logs for cron are kept in /var/log. The file cron shows the details of when jobs were run.
Bill
Last edited by wmakowski; 03-02-2007 at 02:43 PM.
|
|
|
All times are GMT -5. The time now is 09:10 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
|
|