Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jul 2006 20:37:32 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        perikillo <perikillo@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: User crontab file dosent run...?
Message-ID:  <20060717173732.GA13654@gothmog.pc>
In-Reply-To: <51d7a5160607171017v148af14v2c838ca5bd129b87@mail.gmail.com>
References:  <51d7a5160607171017v148af14v2c838ca5bd129b87@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-07-17 10:17, perikillo <perikillo@gmail.com> wrote:
> Hi people.
> 
>  Im testing how to run scripts from cron using the crontab program,
> the handbook say tha each user need to have a crontab file if they
> want to run some process with the cron program:
> 
> user-x$ crontab -e
> 
> SHELL=/bin/sh
> PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
> MAILTO=root
> */1     *       *       *       *       user-x         /bin/echo "Testing"

The /etc/crontab file is *NOT* the same as the user crontab files.

It has an extra field, at column 6, which specifies which user this
entry will run as.

In user crontabs, the sixth field is the command-name, as below:

| $ crontab -l
| PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/home/giorgos/bin
| 
| # Email me calendar entries at 00:00 every day
| @daily                          /usr/bin/calendar
| 
| # Save backup copies of my Mercurial repositories in /g/repos
| 0,10,20,30,40,50 * * * *        /home/giorgos/cron.d/repos-gker
| 
| # Save backup copies of my Mercurial repositories in /g/repos
| #3,13,23,33,43,53 * * * *       /home/giorgos/cron.d/repos-bmi
| 
| # Rotate all log files under `/home/giorgos/log', according to the
| # options specified in the `/home/giorgos/log/newsyslog.conf' file.
| #8,18,28,38,48,58 * * * *       /home/giorgos/cron.d/logrotate
| $

So, your user crontab entry tries to run a command called `user-x',
which does not exist of course...




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