From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104841 invoked by alias); 17 Jul 2017 17:41:43 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 104328 invoked by uid 89); 17 Jul 2017 17:41:42 -0000 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 Received: from nm23-vm0.bullet.mail.ne1.yahoo.com (HELO nm23-vm0.bullet.mail.ne1.yahoo.com) (98.138.91.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Jul 2017 17:41:40 +0000 Received: from [98.138.101.129] by nm23.bullet.mail.ne1.yahoo.com with NNFMP; 17 Jul 2017 17:41:39 -0000 Received: from [98.138.84.42] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 17 Jul 2017 17:41:39 -0000 Received: from [127.0.0.1] by smtp110.mail.ne1.yahoo.com with NNFMP; 17 Jul 2017 17:41:39 -0000 X-Yahoo-SMTP: BVtuZFiswBBG504e4DQIhRExpptF4H0nV7E7 Date: Mon, 17 Jul 2017 17:46:00 -0000 User-Agent: K-9 Mail for Android In-Reply-To: <8bb16934-972b-5d3e-918f-36eec3d16ca6@gmail.com> References: <97021E71-D804-42AF-8358-6276AF4514AB@gmail.com> <20170714052736.GA2895@phoenix> <8bb16934-972b-5d3e-918f-36eec3d16ca6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: How to repeat a bash shell script until success To: cygwin@cygwin.com,cyg Simple From: "Ian Lambert via cygwin" Reply-To: Ian Lambert Message-ID: X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00258.txt.bz2 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 . >>=20 > >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-cyg= win-on-windows cyg Simple, Thanks much for this. It seems the link is misleading, because it says cygr= unsrv and cron-config must be used to get Cron to work.=20 I've been frustrated without admin, being unable to use these. It turns out= simply adding=20 /usr/sbin/cron to .bashrc will make Cron available. Or, slightly more compl= icated,=20 to avoid "lock" errors: $HOME/bin/startcron Containing: #!/bin/bash if P=3D$(pgrep cron) then echo "already running, PID is $P" else echo "not running, starting now" /usr/sbin/cron fi Thanks! --=20 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