linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: urgrue <urgrue@tumsan.fi>
To: linux-admin@vger.kernel.org
Subject: weird script behaviour
Date: Fri, 23 May 2003 15:48:40 +0300	[thread overview]
Message-ID: <20030523124840.GA3865@fede2.tumsan.fi> (raw)

i have script that runs ok from the prompt but doesnt run ok at all 
from cron (yes we've all seen this before, but this time its weirder 
than usually).
i even tried running it with env -i , but i cant reproduce the problem 
at the shell - it only appears when started from cron.
the problem also does NOT appear when started with "at".
i snipped the script down to a bare test minimum and am still able to 
reproduce the error, here it is:

#!/bin/bash

while true
do
sleep 1
echo "start" | logger
ping -n -c 1 -w 3 10.155.11.37 && continue
echo "we didnt continue..... | logger
done

point is to spot if a ping doesnt go.
run from the prompt, it works fine - it pings every second and i never 
get to the "we didnt continue" part.
run from cron, it may or may not run ok for a little while (a minute or 
so), but then it starts to repeatedly reach the "we didnt continue" 
part - and itll keep hitting that part over and over again until i 
intervene.
with a little extra checking, i found out that the ping isn't returning 
zero (as it does from the shell), but its returning 141! where does 
this come from? why does it only start appearing after a minute or so?


             reply	other threads:[~2003-05-23 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23 12:48 urgrue [this message]
2003-05-23 13:34 ` weird script behaviour Jamie Harris
  -- strict thread matches above, loose matches on Subject: below --
2003-05-23 14:26 pacho baratta

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=20030523124840.GA3865@fede2.tumsan.fi \
    --to=urgrue@tumsan.fi \
    --cc=linux-admin@vger.kernel.org \
    /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).