Re: [opensuse] logrotate and crontab



On Thursday 29 March 2007 09:47, Verner Kjærsgaard wrote:
Torsdag 29 marts 2007 16:35 skrev Kenneth Schneider:
On Thu, 2007-03-29 at 11:08 -0300, Rejaine Monteiro wrote:
Hi,

I've been having a look on how crontab is setup on default Suse
9.2/10.0/10.1 servers,
since i wanted to find out when logs are being rotated.

as far as i can see, the default crontab entries (in /etc/cron.daily,
etc/cron.hourly etc.) are being scheduled via the /etc/crontab master
file:

-*/15 * * * * root test -x /usr/lib/cron/run-crons &&
/usr/lib/cron/run-crons >/dev/null 2>&1
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly

but at what time does for example /etc/cron.daily/* get run ?

hourly: on the hour
daily: 4:15am
weekly: 4:30am
monthly: 4:45am

--
Ken Schneider
UNIX since 1989, linux since 1994, SuSE since 1998

Hi list and Ken,

- those hours and times are not hardcoded into something?
- can you tell us where they are located?

- thank you!

As I can see in cron output that minutes are first, then hours, then hmm ...
man 5 crontab
"The time and date fields are:

field allowed values
----- --------------
1 minute 0-59
2 hour 0-23
3 day of month 1-31
4 month 1-12 (or names, see below)
5 day of week 0-7 (0 or 7 is Sun, or use names)"

1 2 3 4 5
59 * * * * for hourly
14 4 * * * is for daily, etc.


-------------------------------------------------------------------------
Med venlig hilsen/Best regards
Verner Kjærsgaard

--
Regards, Rajko.
http://en.opensuse.org/Portal
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages