delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/08/21/07:59:52

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 DOT lewis AT gmail DOT com>
To: cygwin AT cygwin DOT com
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019