From: Stefan Wimmer <swimmer@gx.nl>
To: Tom Troonbeeckx <tom.troonbeeckx@ideaxis.com>
Cc: linux-admin@vger.kernel.org
Subject: Re: Cronjobs
Date: Wed, 30 Jul 2003 10:05:16 +0200 [thread overview]
Message-ID: <20030730080516.GZ26455@gx.nl> (raw)
In-Reply-To: <ALECJBOGPBKDNCCOAFDDMEIHCOAA.tom.troonbeeckx@ideaxis.com>
* Tom Troonbeeckx <tom.troonbeeckx@ideaxis.com> wrote on 30/Jul/2003 - 09:34:38 :
> Dear Sir/Madam,
>
> I have some proplem with mine cronjobs.
>
> I edit mine /etc/crontab with the following command "crontab -e".
> The crontab looks like this
>
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> HOME=/
>
> # run-parts
> 01 * * * * root run-parts /etc/cron.hourly
> 01 0 * * * root run-parts /etc/cron.daily
> 30 14 * * * root run-parts /etc/cron.twice.a.day
> 30 18 * * * root run-parts /etc/cron.twice.a.day
> 22 4 * * 0 root run-parts /etc/cron.weekly
> 42 4 1 * * root run-parts /etc/cron.monthly
> 3,18,33,48 * * * * root run-parts /etc/cron.quarter-hourly
> 1,6,11,16,21,26,31,36,41,46,51,56 * * * * root run-parts /etc/cron.5-min
>
> I restarted the anacron-daemon. I tested the cronjobs individually and they
> work fine.
> However, since I scheduled them I receive an email after each 5 and 15
> minutes with the message
> /bin/bash: root: command not found
>
> I figured out that the crondaemon is trying to execute the command root. At
> some point it doesn't count the userprivilege of the cronjob.
>
> The configuration looks in mine opinion fine. Any ideas what went wrong?
>
> Thanks in advance....
By using "crontab -e" you're editing your personal cron file (located in
/var/spool/cron in RedHat) and there you don't need the user who is
running the commands ... so leaving out "root" from your lines should help.
old: 3,18,33,48 * * * * root run-parts /etc/cron.quarter-hourly
new: 3,18,33,48 * * * * run-parts /etc/cron.quarter-hourly
By the way - if you want some jobs running every 15 minutes you can use the syntax
old: 3,18,33,48 * * * * root run-parts /etc/cron.quarter-hourly
new: */15 * * * * run-parts /etc/cron.quarter-hourly
as well (I have to admit that I don't know adhoc how you can start it at
the third minute ;-} ).
Hope this helps
Stefan
next prev parent reply other threads:[~2003-07-30 8:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-30 7:34 Cronjobs Tom Troonbeeckx
2003-07-30 7:44 ` Cronjobs César Soler
2003-07-30 7:59 ` Cronjobs Vladimír Dvoøák
2003-07-30 8:17 ` Cronjobs Horia Chirculescu
2003-07-30 8:05 ` Stefan Wimmer [this message]
2003-07-30 10:16 ` Cronjobs Andrew Kelly
2003-07-30 8:13 ` Cronjobs Scott Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030730080516.GZ26455@gx.nl \
--to=swimmer@gx.nl \
--cc=linux-admin@vger.kernel.org \
--cc=tom.troonbeeckx@ideaxis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).