User crontab file dosent run...?
Giorgos Keramidas
keramida at ceid.upatras.gr
Mon Jul 17 17:38:07 UTC 2006
On 2006-07-17 10:17, perikillo <perikillo at 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...
More information about the freebsd-questions
mailing list