Unless one has the (very good) habit of going to bed before midnight, the current defaults are pretty annoying. Although this can be easily changed I believe that the defaults should be set to suite the needs of most people. I found the times that RedHat uses quite convenient, since it schedules everything to 4:00am (it also schedules for different minutes within the hour but this isn't necessary as /usr/sbin/run-crons already serializes the scripts to run). This is how I've configured crontab: */15 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons 0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 0 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily 0 4 * * 0 root rm -f /var/spool/cron/lastrun/cron.weekly 0 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
hi, i am not sure i understand your problem... you are working on the machine at midnight and therefore you don't want the cron.s to be executed, but want them executed at 4 in the morning, when you are not working on the machine? or is there more? regards Thilo
Yes, that's it! The scheduling for different minutes within the hour (i.e., not run simultaneously stuff that is done each day with the stuff done each hour to avoid overload the machine) was just a side comment since, as I said before, the /usr/sbin/run-crons script already achieves that without expliciting giving different minutes for the different schedules because it runs the cron jobs one after the other, and not all at the same time.
given your request some thought i think i have to disagree although i think your point is valid and i personally don't like to be interrupted by cron.daily either, i would expect a cron.daily to be run at midnight. this said and knowing that Gentoo (currently) is aimed at sysadmins (who know their way around) i think the current behavior is the way it should be(TM)... also IIRC currently there are no "big" things in cron.daily, so this is only an issue if you put extra stuff there yourself, and then you might want to change anyway... (i might be wrong though) kind regards Thilo
After you have given so much thought I don't expect to convince you otherwise but I'll address your points, one by one. Nowhere in the dictionary definition of the words "daily", "hourly" is assumed that these time intervals specify that it should be set on the beggining of the day, hour, etc. I don't know why would someone would expect that the "daily" would be done at midnight, when others linux distributions don't follow wthis. I also don't consider what a person would expect or not as an argument here. Efficiency and suitability should be enough. The argument that gentoo is targeted for people who know what they're doing and that will change as they like isn't an excuse to leave things as they are. By that principle then why improve anything? (Hey, why even use gentoo as most capable sysadmin can install everything from sources?) If gentoo is really targeted to sysadmins then why _nowhere_ in the "About Gentoo" page is that mentioned? There mentions flexibility and power, but if you continue to use that reasoning then Gentoo will surely become just for sysadmins, and always remain as that. Again I don't see this Update the locate database is "big" thing - and it's proportional to the size of your disk. Of course that's disabled by default...! 'locate' probably isn't a thing that a "sysadmin" uses all the time, but I use constantly. As far as I'm concerned I have my problem solved - I'm no sysadmin but I know my way around things. I confess that when I made my request I had in mind other desktop users new to gentoo, and althought I don't see in what way my request would affect a "sysadmin", I think that you'll probably right in leaving things as they are: in the end, if this bugs anybody else than just me, then you'll surely receive more bug reports and then you'll be more sure. Regards, Jose Fonseca
please don't accuse me of not wanting to improve stuff - it may be that red hat has these run-crons times, but where i come from (SuSE) cron.daily is executed at midnight... (at least back when i used it) to quote http://www.gentoo.org/index-about.html : Gentoo Linux is a versatile and fast, completely free Linux distribution for x86, PowerPC, Sparc and Sparc64 that's geared towards Linux power users. well, okay. power users then - they know their way around... you are right: updating the locatedb is a large job and i wouldn't want it to run while working on a machine and i do use 'locate' - but i don't update the db nearly as often and hence i am running updatedb whenever i feel i need to. YMMV. if you feel so strongly about it, you may want to go and propose this change on gentoo-dev. as i said: i can see your point - i am sorry that you can't see mine... so far it is one vote against another - a point where i am not willing to change the current default. and please don't feel offended because i rejected your improvement. i am sorry if i haven't made clear that your effort to improve gentoo is very much appreciated. i'm reopening this bug, because this issue obviously has not been solved. i am currently in exams and therefore not subscribed to gentoo-dev - so please add the outcome of the discussion here, so that whatever has been decided on can be implemented. thanks regards Thilo
I'm not offended for you have rejected my request, nor was my intention to acuse you of not wanting to improve stuff. I confess that the "sysadmin" stuff did get under my skin - I'm not a big fan of this kind of broad assumptions over the userbase which usually only restrain the flexibility -, and for that I appologize I'll do as you asked and put the problem on gentoo-dev. Regards, Jos
I'm not offended for you have rejected my request, nor was my intention to acuse you of not wanting to improve stuff. I confess that the "sysadmin" stuff did get under my skin - I'm not a big fan of this kind of broad assumptions over the userbase which usually only restrain the flexibility -, and for that I appologize I'll do as you asked and put the problem on gentoo-dev. Regards, José Fonseca
I feel that it is not at all good to have everything run at 00:00. It is good to stagger things, and I think something like 02:35 or the such would be a better choice. FreeBSD seems to set their daily, weekly, and monthly to go off at 03:01, 04:15, and 05:30, respectively. Personally, I think it would be wise to have whatever runs at a periodic schedule to sleep for a random time first, so that all the machines running gentoo don't, for say, all run 'emerge rsync' at the same time. I should disclaim that I despise the run-crons setup and that something more like FreeBSD's periodic script is better :)
For information, FreeBSD's periodic script is quite simple: The name of the script is 'periodic', and you run it as: periodic <periodiciity> or periodic <dir> It's nothing fancy; in the case of a periodicity, such as 'hourly', 'monthly', it looks into the directory /{usr/local,}etc/periodic/<periodicity/* and runs everything that is executable in it. If given the just the <dir>, then it runs everything in that specific dir. It's very simple and usable, nothing fancy. http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/periodic/periodic.sh?rev=1.9.2.8&content-type=text/x-cvsweb-markup The run-crons bit is just unnecessarily complex, IMO. I believe it was having race condition problems on my system, 'touch'ing files too early or too late, I forget.
Oh, I forgot to mention: FreeBSD's periodic's crontab entries are: 1 3 * * * root periodic daily 15 4 * * 6 root periodic weekly 30 5 1 * * root periodic monthly
With the cronjobs for hourly, daily, weekly, and monthly all running at the same hour and minute, the _possibility_ is there to, IMHO, needlessly elevate system load. Even seperating the execution *minute* by 5-10 mins for each category would prevent this occourance in the default configuration. As for the issue of cron jobs running while you're on the machine... Dont use a notebook with anacron running.... THEN it get's annoying. :) Personally, I don't think the *hour* needs changing. I would categorize it as 'a good thing' if a default setting allows a sysadmin the ability to add cron jobs in one of those categories and NOT have to worry (too much?) about loading the machine up in the process.
Like I mentioned, to prevent high system loads, I do this in the periodic script on my machine (which I stole from FreeBSD): sleep `expr $RANDOM % 900`
Quoting from Frank, "FreeBSD seems to set their daily, weekly, and monthly to go off at 03:01, 04:15, and 05:30, respectively." That seems about perfect for me. RedHat's default for 6.2 is: *:01 (hourly), 04:02 (daily), 04:22 (weekly), and 04:42 (monthly) I think I would prefer FreeBSD's.
hm, interesting debate. I'm having some issues getting cron to actually _read_ /etc/crontab or at least do what it's supposed to with them. but when it comes to the question of when to run stuff, 4am is fine. midnight is something I really find annoying, and most Suse people I know have done something about it.
Who's on the cron team? ;P
Problem comes in, that many people have things like log cyclers run daily/monthly in their /etc/cron.*. If someone is using one such process as this, and also using something like webalizer, then everything before that time will not be properly recorded. Consider the sitation of a website that cycles (copies, truncates, compresses copy) its weblogs every month. If the monthly tasks ran at 5:30am, then they lose 5 1/2 hours worth of data for that month, because webalized will no longer see the hits. Most people DO actually expect monthly to mean 'when the month ticks over', etc.
There is such thing as the root own crontab. Also I think that the requirement of having to run at midnight must be a design fault of webalizer. The web log files store the access date, so the date information is still there. AWStats, for example, has no problem with that. See http://awstats.sourceforge.net/docs/awstats_faq.html#ROTATE .
Maybe I'm being a dumbass, but what about just nice-ing cron? Wouldn't this solve the problem of thrashing when you want to work well enough?
pebenito, make a judgement call on this issue and close this up
Last chance to speak up, otherwise we'll go with the FreeBSD timings.
All crons have been updated to the FreeBSD timings.