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:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:to:from:reply-to :message-id; q=dns; s=default; b=bI8AxamXGwUwr+ooREkVp7T0AG18eLU BWuiwhqzXcsogD0XwimOOvnRPmpWeI+tdmtJrqyA4hqc4/q77I2/gvI5qClWalXY EM+oWkdY+i/hsCBKEoqbKcJJN8iUSG09aB+9As88NY4Y+ywdw8gVXQtG9299UpcT +qtVJoi6bitU= 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:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:to:from:reply-to :message-id; s=default; bh=L4I8PGrHm80zOSo27PCAxVvfdZI=; b=mhzDG Nmnk5FJ28mKmegRUWR3N2Q+3rfB5Q3hcOpCHqL3zo/nE9lOZdEViPQq6IrMYo8aR QW6tFhPid3PG4+8XUBh7NBY+wmje0k0fVdosHxeUc4SPY7sRrjBbAn7UpWUEFUOu VPnGL5YEVbvLdWoi7sryGIe9UDpLhcCyMe1goU= 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=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:NNFMP, frustrated, interpretation, waits X-HELO: nm23-vm0.bullet.mail.ne1.yahoo.com X-Yahoo-SMTP: BVtuZFiswBBG504e4DQIhRExpptF4H0nV7E7 Date: Mon, 17 Jul 2017 13:41:32 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <8bb16934-972b-5d3e-918f-36eec3d16ca6@gmail.com> References: <97021E71-D804-42AF-8358-6276AF4514AB AT gmail DOT com> <20170714052736 DOT GA2895 AT phoenix> <8bb16934-972b-5d3e-918f-36eec3d16ca6 AT gmail DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Subject: Re: How to repeat a bash shell script until success To: cygwin AT cygwin DOT com, cyg Simple From: "Ian Lambert via cygwin" Reply-To: Ian Lambert Message-ID: X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v6HHgKke012404 On July 14, 2017 9:06:02 AM EDT, cyg Simple <> wrote: >On 7/14/2017 1:27 AM, Gary Johnson wrote: >> On 2017-07-12, Bryan Dunphy wrote: >>> I have a shell script, originally created for Mac OS X. that waits >>> for an external drive to be mounted (by . >> > >In reality the OP script appears to be executed in a crontab system and >executed every X minutes. So a change to the OP question is needed >which is answered at[1]. Let's remember some people have no real clue >as to what question they should ask and we need to interpret what is >being asked into what should have been asked. If interpretation isn't >possible then asking for a use case would be warranted. > >[1] >https://stackoverflow.com/questions/707184/how-do-you-run-a-crontab-in-cygwin-on-windows cyg Simple, Thanks much for this. It seems the link is misleading, because it says cygrunsrv and cron-config must be used to get Cron to work. I've been frustrated without admin, being unable to use these. It turns out simply adding /usr/sbin/cron to .bashrc will make Cron available. Or, slightly more complicated, to avoid "lock" errors: $HOME/bin/startcron Containing: #!/bin/bash if P=$(pgrep cron) then echo "already running, PID is $P" else echo "not running, starting now" /usr/sbin/cron fi Thanks! -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -- 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