Re: [gentoo-user] Daily dumb question... chron.

2005-07-19 Thread Steve [Gentoo]

Bob Sanders wrote:

Are thse system tasks supposed to be fired automatically by fcron? 
   


Yes.  In the ebuild it says -
   einfo To activate /etc/cron.{hourly|daily|weekly|montly} please run: 
   einfo crontab /etc/crontab
 

I hadn't seen that message - but then again, when I installed fcron the 
/etc/cron.* stuff wasn't especially important to me... so I might easily 
have ignored it at the time.  It's a pity this sort of essential 
warning isn't available for all packages as some kind of Gentoo 
knowledge base - I guess I could read the ebuild files - but it would be 
far more convenient to have tips/tricks/gotchas available annotated with 
each package - say on http://packages.gentoo.org/...  Hmmm.


In any case, thanks - crontab /etc/crontab seems the perfect resolution.

Steve

--
gentoo-user@gentoo.org mailing list



[gentoo-user] Daily dumb question... chron.

2005-07-18 Thread Steve [Gentoo]
Because I need my Gentoo server to perform periodic tasks on my behalf I 
new I needed some implementation of cron - and after a brief 
investigation I settled on fcron as I liked the idea that I could give 
flexible scheduling in order to allow the OS to delay processing in the 
event of heavy system load.  I've written a couple of my own 
administration tasks (to be run as my own non-root user) and these work 
fine.


I've noticed the directories /etc/cron.daily; /etc/cron.hourly; 
/etc/cron.monthly etc. and therein a bunch of non-user-specific 
administration tasks... For example, in ./etc/cron.daily I've 
logrotate.cron and rulesdujour - but none of these appear to have run in 
the last month.  Are thse system tasks supposed to be fired 
automatically by fcron?  What would be the easiest way to get all my 
periodic system administration tasks defined in these directories to be 
fired automatically?  Did I make a sensible choice with fcron?




--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Daily dumb question... chron.

2005-07-18 Thread Hans-Werner Hilse
Hi,

On Mon, 18 Jul 2005 13:06:29 +0100
Steve [Gentoo] [EMAIL PROTECTED] wrote:

 I've noticed the directories /etc/cron.daily; /etc/cron.hourly; 
 /etc/cron.monthly etc. and therein a bunch of non-user-specific 
 administration tasks... For example, in ./etc/cron.daily I've 
 logrotate.cron and rulesdujour - but none of these appear to have run in 
 the last month.  Are thse system tasks supposed to be fired 
 automatically by fcron?  What would be the easiest way to get all my 
 periodic system administration tasks defined in these directories to be 
 fired automatically?  Did I make a sensible choice with fcron?

Can't tell much about fcron (esp. if its config syntax is similar to my
vixie-cron), but for me, vixie-cron installed a /etc/crontab that
contains the following lines:

0  *  * * * rootrm -f /var/spool/cron/lastrun/cron.hourly
1  3  * * * rootrm -f /var/spool/cron/lastrun/cron.daily
15 4  * * 6 rootrm -f /var/spool/cron/lastrun/cron.weekly
30 5  1 * * rootrm -f /var/spool/cron/lastrun/cron.monthly
*/10  *  * * *  roottest -x /usr/sbin/run-crons  /usr/sbin/run-crons

this does the job.

-hwh
-- 
gentoo-user@gentoo.org mailing list



RE: [gentoo-user] Daily dumb question... chron.

2005-07-18 Thread Dave Nebinger
 Are thse system tasks supposed to be fired
 automatically by fcron?

You missed the message that flew by when emerging fcron...

Fcron includes the /etc/cron.* directories but does not install cron jobs
for them automatically, and it does not support /etc/crontab (as other crons
do).

You need to manually add them to the root crontab.  Easiest way would be to:

1. su - (or login as root).
2. crontab -l root  root.crontab (to get any existing cron entries for
root).
3. vi root.crontab and add the following:

# Clean the lastrun directories...
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

# Now do the command to determine what tasks need to be executed
# Only generate emails on errors...
!nolog(true)
*/10  *  * * *  /usr/bin/test -x /usr/sbin/run-crons 
/usr/sbin/run-crons

4. crontab root.crontab (to make the changes take effect)

This will install the appropriate cron jobs to have the /etc/cron.* scripts
run.

Dave



-- 
gentoo-user@gentoo.org mailing list



RE: [gentoo-user] Daily dumb question... chron.

2005-07-18 Thread Dave Nebinger

 
 # Now do the command to determine what tasks need to be executed
 # Only generate emails on errors...
 !nolog(true)

Oops, this nolog bit comes from my crontab and is not normally put in.  I
added it because I hated getting emails for regular runs.  If you choose to
include it, add !reset to the line after the run-crons line of the text I
sent.


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Daily dumb question... chron.

2005-07-18 Thread Bob Sanders
On Mon, 18 Jul 2005 13:06:29 +0100
Steve [Gentoo] [EMAIL PROTECTED] wrote:

ne.
 
 I've noticed the directories /etc/cron.daily; /etc/cron.hourly; 
 /etc/cron.monthly etc. and therein a bunch of non-user-specific 
 administration tasks... For example, in ./etc/cron.daily I've 
 logrotate.cron and rulesdujour - but none of these appear to have run in 
 the last month.  Are thse system tasks supposed to be fired 
 automatically by fcron? 

Yes.  In the ebuild it says -

einfo To activate /etc/cron.{hourly|daily|weekly|montly} please run: 
einfo crontab /etc/crontab

  What would be the easiest way to get all my 
 periodic system administration tasks defined in these directories to be 
 fired automatically?  Did I make a sensible choice with fcron?
 

I just add the tasks to s specific script in the appropriate account and insure 
the
script is executable.  It all works fine with fcron.

Bob
-  
-- 
gentoo-user@gentoo.org mailing list