X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:date:message-id:subject:from:to
	:content-type; q=dns; s=default; b=M252tY3YW8vZ5A0xdTyq8TjH1DinL
	z3Oce8tKfrYIW147QCV8KaXS8BPDS62gTlpmq8tN5SU+pLGwm9h846t9K4mGPP3n
	T7xK0f9U6hozE2P760zaft5VcE0hJfmTHmbrDJeBBu27NVDqki8rqCT1fOEOfPzE
	sPo+Vbg701pmoI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:date:message-id:subject:from:to
	:content-type; s=default; bh=7I+s+Qto2tsiCE6PsT1RnnSFpjI=; b=VKl
	wy6rQ6V93THTQ06QeGoYOmGZNTYS2U6rUGc1bTHa3Bu7HlpMjMH1VoI44xacI82Q
	Y/fcH/sMjEdhe+kSOvJtjw26cFoRUp+Op/7gr9p3BKPafWYr5LZ4Ra0qmro6x+t/
	F4alXXyet8Fyg/cAMXjr2X3LnO6pmBtjE3Ki/CdA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-qa0-f52.google.com
MIME-Version: 1.0
X-Received: by 10.140.84.21 with SMTP id k21mr81845704qgd.70.1408622369287; Thu, 21 Aug 2014 04:59:29 -0700 (PDT)
Date: Thu, 21 Aug 2014 07:59:29 -0400
Message-ID: <CAEF1h+VvERQqWKnorMSFRF=NPhbMU+OTO437VkmJK7eY-buvgQ@mail.gmail.com>
Subject: Problem with cron jobs
From: Cary Lewis <cary.lewis@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

I have created a small shell script that acts like a network
connectivity watchdog, which checks for a successful ping to the
internet, and if it doesn't work, restarts the machine.

When I attempt to run it from a cron job, the script exits whenever
any of the commands exits with a non zero status, preventing the
script from doing its job.

Has anyone seen this behaviour before?

I have tried wrapping the script in () to run it within a sub-shell,
but to no avail.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

