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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=wVn1vS50lmQAYezu NINtlk7wLBxtdT6FuVMlA/7xS0KrBptvcKfiG0H6tGUqhjWkGfDWbeFA872r1lio hMFTKAMFnKp1AF2H03LccAddu+2+EKxAQ4YVahNvhMlYST+wJ9Yl4BpqMmFLwcij DlAuafnVpYT6jwTMrL+nzkDfkQE= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=qiu+n2xvweICx1g0DR+bDf SPibs=; b=OAQW3UVa3B1lc6tyixVyVH4SRcAGMNkyuLRCTGmowsPJsXFVxLPSkt JoqQ4TT7ujvfn1CFK208eJ5d9C/AsWJFVSSl6ggJkr0ld/2s3Zzx3nV7cJ4G5/yg LJCOIQ+fYaQHbS8TQry+DucFDYkFhMj0pC9TzOEPqbmLD1PkU7Kms= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=3.7 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Date: Thu, 21 Aug 2014 18:25:00 +0400 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <1041974061.20140821182500@yandex.ru> To: Cary Lewis , cygwin AT cygwin DOT com Subject: Re: Problem with cron jobs In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Greetings, Cary Lewis! > 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. man bash You have to disable abort-on-error in your script. -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 21.08.2014, <18:24> Sorry for my terrible english... -- 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