[KLUG Members] Cron? problems

Adam Bultman members@kalamazoolinux.org
Tue, 23 Apr 2002 18:02:20 -0400 (EDT)


Here's what I think it might be: Are you mailing the results to yourself?

If you give cron something to say, it will respond to you with the
results. Then, if you pipe the output to yourself, you'll see it twice.
Where's the message originating from?   So if I run a script that says,
"Hello world", called, hello.pl, and I put it in cron like this:

1 1 * * * * /sbin/hello.pl |mail root@localhost

I'll get two emails.  One from cron saying how things went, with whatever
was outputted, and another in a mail form after cron was done.

That's what it MIGHT be, if you are piping the results to an email,
addressed to yourself.


-- 
Adam Bultman
adam@glaven.org
[ http://www.glaven.org ]


On Tue, 23 Apr 2002, Dirk H Bartley wrote:

> Can anyone tell me if the issue I am seeing is between the keyboard and the chair, or is
> just bizzarre.  I have cron jobs which are running twice.  Not every time but some of the
> times.  The job will run once, and then again a second later.  Is there anything in cron
> which will check to see if the job ran and then retry???????  I am so confused.  The
> standard output and error will be in my mailbox twice, once for the scheduled time and
> then again for one second later.  If I put an & at the end of the line in the crontab, the
> issue seems to go away.
>
> Dirk
> _______________________________________________
> Members mailing list
> Members@kalamazoolinux.org
> 
>