overlapping /etc/cron.daily & /etc/cron.weekly

overlapping /etc/cron.daily & /etc/cron.weekly

Post by Otavio Ex » Wed, 12 Apr 2000 04:00:00



hello all,

I intend to run a very lengthy process in /etc/cron.daily/* and there is
a good chance that it will overlapp with /etc/cron.weekly/*; as I
understand this overlap should be avoided so I'd like to find a way to
run /etc/cron.weekly/* right after /etc/cron.daily/* finishes;

to my knowledge the best way is to comment out the 3 lines from
/etc/crontab and run the following script instead:

        run-parts --report /etc/cron.daily

        if [ $(date +%w) == 0 ]; then
                run-parts --report /etc/cron.weekly
        fi

        if [ $(date +%d) == 01 ]; then
                run-parts --report /etc/cron.monthly
        fi

but I really don't like the idea of messing with the system crontab..

what do you think?
will it break something else?
is there a widely accepted way to do this?

TIA!

--