| View previous topic :: View next topic |
| Author |
Message |
Massimo B. Veteran


Joined: 09 Feb 2005 Posts: 1143 Location: PB, Germany
|
Posted: Sat Nov 18, 2006 9:37 pm Post subject: A better default fcrontab |
|
|
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(dev.notes[pdf]) | amd64:Core2Duo | amd64-prefix:OpenSuse@Core2Quad | Lila-Theme
Last edited by Massimo B. on Thu Nov 23, 2006 8:48 am; edited 1 time in total |
|
| Back to top |
|
 |
nixnut Administrator


Joined: 09 Apr 2004 Posts: 10971 Location: the dutch mountains
|
Posted: Sat Nov 18, 2006 9:40 pm Post subject: |
|
|
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 |
|
 |
Massimo B. Veteran


Joined: 09 Feb 2005 Posts: 1143 Location: PB, Germany
|
Posted: Thu Nov 22, 2012 9:44 am Post subject: |
|
|
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(dev.notes[pdf]) | amd64:Core2Duo | amd64-prefix:OpenSuse@Core2Quad | Lila-Theme |
|
| Back to top |
|
 |
|
|
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
|
|