[PlanetCCRMA] Re: PlanetCCRMA digest, Vol 1 #960 - 3 msgs

Kjetil Svalastog Matheussen k.s.matheussen@notam02.no
Thu Nov 18 09:33:02 2004


Fernando Lopez-Lezcano:
> 
> On Tue, 2004-11-16 at 07:02, Timo Sivula wrote:
> > On Tue, 2004-11-16 at 22:52, David Fraser wrote:
> > 
> > > >My system generates a couple of xruns at 4 am every night, but stays
> > 
> > > Presumably this is because of some cron jobs you have running?
> > 
> > How can I see what jobs are on the list?
> 
> Look at the contents of 
> /etc/cron.d
> /etc/cron.daily
> /etc/cron.hourly
> /etc/cron.monthly
> /etc/cron.weekly
> 
> (hourly, weekly, monthly and daily scripts are triggered from
> /etc/crontabs. 
> 
> To see which package "owns" each script you could do:
> rpm -q -f /etc/cron.d/*
> 

At the machines at notam in Oslo I have made the cron-jobs not to
run when theres a person logged in to the machine.

First run this:

cp -f /etc/config/run-parts2 /usr/bin/

if grep "run-parts " >/dev/null /etc/crontab ; then
    cp -f /etc/crontab /etc/crontab.org
    sed s/run-parts\ /run-parts2\ / </etc/crontab.org >/etc/crontab
    echo "crontab changed"
fi
if grep "run-parts " >/dev/null /etc/anacrontab ; then
    cp -f /etc/anacrontab /etc/anacrontab.org
    sed s/run-parts\ /run-parts2\ / </etc/anacrontab.org >/etc/anacrontab
    echo "anacrontab changed"
fi


After making a /etc/config/run-parts2 file that looks like this:

#!/bin/bash

if ! ps -A |grep ssh-agent ; then
    run-parts $@
fi



--