Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A better default fcrontab
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1305
Location: PB, Germany

PostPosted: Sat Nov 18, 2006 9:37 pm    Post subject: A better default fcrontab Reply with quote

With dcron and cronbase this should be the default crontab:
Code:
## cronbase original ##

&options       min     hrs     day-of-month    month   day-of-week     command
               0       *       *               *       *               rm -f /var/spool/cron/lastrun/cron.hourly
               1       3       *               *       *               rm -f /var/spool/cron/lastrun/cron.daily
               15      4       *               *       6               rm -f /var/spool/cron/lastrun/cron.weekly
               30      5       1               *       *               rm -f /var/spool/cron/lastrun/cron.monthly
               */10    *       *               *       *               /usr/bin/test -x /usr/sbin/run-crons && /usr/sbin/run-crons

After switching to fcron I wanted to make use of the abilities concerning cpuload and uptime:
Code:
@first(5),lavg5(1),until(10)                   1h      rm -f /var/spool/cron/lastrun/cron.hourly
@first(3h15),lavgand,lavg(1,2,3),until(2h)     1d      rm -f /var/spool/cron/lastrun/cron.daily
@first(4h30),lavgand,lavg(1,2,3),until(5h)     1w      rm -f /var/spool/cron/lastrun/cron.weekly
@first(5h45),lavgand,lavg(1,2,3),until(5h)     1m      rm -f /var/spool/cron/lastrun/cron.monthly
@nolog(true),lavg1(1),until(2)                 10      /usr/bin/test -x /usr/sbin/run-crons && /usr/sbin/run-crons

Finally I think with fcron the cronbase script run-crons doesn't make sense anymore:
Code:
#@options       LoadAvg1,5,15   timeout         freq.   command

 @first(5),lavg5(1),until(10)                    1h      run-parts /etc/cron.hourly
 @first(3h15),lavgand,lavg(1,2,3),until(2h)      1d      run-parts /etc/cron.daily
 @first(4h30),lavgand,lavg(1,2,3),until(5h)      1w      run-parts /etc/cron.weekly
 @first(5h45),lavgand,lavg(1,2,3),until(5h)      1m      run-parts /etc/cron.monthly

What do you think?
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme


Last edited by Massimo B. on Thu Nov 23, 2006 8:48 am; edited 1 time in total
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sat Nov 18, 2006 9:40 pm    Post subject: Reply with quote

Moved from Gentoo Chat to Off the Wall.
Not about gentoo, but a general system administration question. So moved here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1305
Location: PB, Germany

PostPosted: Thu Nov 22, 2012 9:44 am    Post subject: Reply with quote

Eventhough I disabled logging for the hourly part:
Code:
@nolog,first(5),lavg1(1.2),until(30)            1h      run-parts /etc/cron.hourly
..I have lots of these log lines:
Code:
Nov 22 05:01:05 [fcron] pam_unix(fcron:session): session closed for user root
Nov 22 06:01:03 [fcron] pam_unix(fcron:session): session opened for user root by (uid=0)
Nov 22 06:01:05 [fcron] pam_unix(fcron:session): session closed for user root
Nov 22 07:01:03 [fcron] pam_unix(fcron:session): session opened for user root by (uid=0)
Nov 22 07:01:05 [fcron] pam_unix(fcron:session): session closed for user root
I even have no hourly script in that folder. Who does this login/logouts and how to get rid of the loglines?
_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1305
Location: PB, Germany

PostPosted: Thu Jul 24, 2014 8:16 am    Post subject: Reply with quote

Update:
Code:
!mail(false)
@nolog,first(5),lavg1(1.2),until(30)            1h      run-parts /etc/cron.hourly
@first(22h15),lavg1(1.2),until(12h)             1d      run-parts /etc/cron.daily
@first(1h30),lavg5(1.4),until(2d)               1w      run-parts /etc/cron.weekly
@first(3h45),lavg15(1.6),until(2d)              1m      run-parts /etc/cron.monthly

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G | amd64:Acer Z5610 (Core2QuadQ8200),i5-3470,VMware VM @ i7-2620M | amd64-prefix:OpenSuse | Lila-Theme
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum