Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Feb 2000 09:30:42 +0200
From:      Ertan Kucukoglu <ertank@ozlerplastik.com>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        questions@FreeBSD.ORG
Subject:   Re: crontab entries
Message-ID:  <38BB75A2.CAB9FC4B@ozlerplastik.com>
References:  <200002281538.KAA03963@server.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> 
> On 28-Feb-00 Ertan Kucukoglu wrote:
> > Hello,
> >
> > I have problems with periodic command in crontab file.
> > ---
> ># do daily/weekly/monthly maintenance
> > 59  1   *   *   *   root    periodic daily 2>&1 | sendmail root
> > 30  3   *   *   6   root    periodic weekly 2>&1 | sendmail root
> > 30  5   1   *   *   root    periodic monthly 2>&1 | sendmail root
> > ---
> >
> > I see the man page of periodic command. It says 'periodic runs the
> > executable scripts and files in the specified directory.' The default
> > directory is /etc/periodic.
> >
> > I have cron jobs setup to run between Monday and Saturday but not
> > Sunday. This periodic command runs my scripts every day although I
> > didn't put my scripts anywhere in /etc/periodic/
> 
> Where did you put your scripts?  It also runs scripts in
> /usr/local/etc/periodic and I think /usr/X11R6/etc/periodic.  Also, what
> do the entries in crontab for your other cron jobs look like?
> 
I don't have the directories you mentioned above:
--
bash-2.03# ls -l /usr/local/etc/periodic
ls: /usr/local/etc/periodic: No such file or directory
bash-2.03# ls -l /usr/X11R6/etc/periodic
ls: /usr/X11R6/etc/periodic: No such file or directory
bash-2.03# 
--

Here are my complete /etc/crontab file:
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.18.2.2 1999/08/29 14:18:39 peter Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
MAILTO=admin
#
#minute hour    mday    month   wday    who     command
#
*/5 *   *   *   *   root    /usr/libexec/atrun
#
# rotate log files every hour, if necessary
0   *   *   *   *   root    newsyslog
#
# do daily/weekly/monthly maintenance
#59  1   *   *   *   root    periodic daily 2>&1 | sendmail $MAILTO
#30  3   *   *   6   root    periodic weekly 2>&1 | sendmail $MAILTO
#30  5   1   *   *   root    periodic monthly 2>&1 | sendmail $MAILTO
#
# time zone change adjustment for wall cmos clock,
# does nothing, if you have UTC cmos clock.
# See adjkerntz(8) for details.
1,31 0-5 *   *   *   root    adjkerntz -a
#
# BNC IRC proxy
#0,10,20,30,40,50 * * * * /home/bnc/bncchk >/dev/null 2>&1
0,10,20,30,40,50        *       *       *       * ertan /home/bnc/bncchk
#
# Otomatik faks tasima
#
*   *   *   *   *   root    /bin/move_faxes >/dev/null 2>&1
#
# Hafta ici sabahlari otomatik internete baglan
30  7   *   *   1-6 root    echo "ppp calistiriliyor..."
30  7   *   *   1-6 root    /usr/sbin/ppp -alias -ddial isp
#
# internete baglandiktan 15 dakika sonra mailleri almaya basla
45  7   *   *   1-6 root    echo "fetchmail calistiriliyor..."
45  7   *   *   1-6 root    /usr/local/bin/fetchmail -L /fm.log -f
/.fetchmailrc
#
# Aksamlari mail loglarini tasi
#
#Once fetchmail'i kapat
45  23  *   *   1-6 root    /bin/ps ax
45  23  *   *   1-6 root    /usr/local/bin/fetchmail -q
46  23  *   *   1-6 root    /bin/ps ax
#Sonra log dosyasini tasi
50  23  *   *   1-6 root    /bin/mv_fmlog
#En son squid log dosyalarini tasi
55  23  *   *   1-6 root    /bin/mv_squid_log
bash-2.03# 

My scripts are located under /bin mostly. I don't change the $PATH
environment in my scripts. I have only one command line that is
fetchmail.

My those scripts are run from Monday to Sunday. I do not see any echo
mails on sunday but my box connects to the internet sundays at 1:59.
This time is the same time with daily perodic cron job and I have no
other job setup at that time. I also don't have any user cron jobs:
--
bash-2.03# ls -la /var/cron/tabs/
total 2
drwx------  2 root  wheel  512 Sep 17 01:36 .
drwxr-x---  3 root  wheel  512 Feb 29 07:00 ..
bash-2.03# 
--

I don't know which path is given to periodic jobs in crontab (I couldn't
understand).

Regards,

--
Ertan Kucukoglu
ertank@ozlerplastik.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38BB75A2.CAB9FC4B>