[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Anacron für User nutzen



Aloha,

wie sollte man Anacron nutzen, wenn man darüber Cronjobs von Usern
ausführen will?
Zwei Ideen habe ich da schon. Nur wollte ich mal horchen, ob es Sinn
macht und ob es überhaupt funktioniert und ob jemand ein bessere,
simplere Idee hat.

1. Skript in /etc/cron.daily(weekly, etc.) das alle Skripte in
/home/*/.cron/daily(weekly, etc.) ausfüehrt.

2. User in die /etc/cron.allow und dieser erstellt eine crontab.

# Markus crontab. Uses Anacron, if available. # Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs
# do.
SHELL=/bin/sh
PATH=/usr/local/bin:/bin:/usr/bin
CRONHOME="/home/markus/.cron"
#minute (0-59),
#|  hour (0-23),
#|  |  day of the month (1-31),
#|  |  |  month of the year (1-12),
#|  |  |  |  day of the week (0-6 with 0=Sunday).
#|  |  |  |  |       commands
17 *    * * *   markus    run-parts --report ${CRONHOME}/cron.hourly
25 6    * * *   markus    test -x /usr/sbin/anacron || run-parts \
--report ${CRONHOME}/.cron/daily
47 6    * * 7   markus    test -x /usr/sbin/anacron || run-parts \
--report ${CRONHOME}/.cron/weekly
52 6    1 * *   markus    test -x /usr/sbin/anacron || run-parts \
--report ${CRONHOME}/.cron/monthly

BTW: Nutzt Anacron die /etc/cron.allow überhaupt?

Cheers,
--
Markus Meyer - encrypted email preferred -> GPG: B87120ED
--- Ich will einen Mann, der nett und verständnisvoll ist. Ist das zuviel
verlangt von einem Millionär?
		-- Zsa Zsa Gabor

Attachment: pgp3I6K9CjcQk.pgp
Description: PGP signature


Reply to: