From: "Ian Lambert via cygwin" <cygwin@cygwin.com>
To: cygwin@cygwin.com,cyg Simple <cygsimple@gmail.com>
Subject: Re: How to repeat a bash shell script until success
Date: Mon, 17 Jul 2017 17:46:00 -0000 [thread overview]
Message-ID: <A2274827-8A59-42BB-BF6C-35EF19A2B878@yahoo.com> (raw)
In-Reply-To: <8bb16934-972b-5d3e-918f-36eec3d16ca6@gmail.com>
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
next prev parent reply other threads:[~2017-07-17 17:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 0:16 Bryan Dunphy
2017-07-14 1:12 ` Brian Inglis
2017-07-14 5:31 ` Gary Johnson
2017-07-14 13:06 ` Gary Johnson
2017-07-14 17:07 ` cyg Simple
2017-07-15 18:40 ` Sorin Adrian Savu
2017-07-17 17:41 ` cyg Simple
2017-07-17 17:46 ` Ian Lambert via cygwin [this message]
2017-07-14 17:34 ` Kaz Kylheku
2017-07-14 19:20 ` Brian Inglis
2017-07-14 19:23 Kaz Kylheku
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A2274827-8A59-42BB-BF6C-35EF19A2B878@yahoo.com \
--to=cygwin@cygwin.com \
--cc=cygsimple@gmail.com \
--cc=ian.lambert_42@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).