X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
X-Cloudmark-SP-Filtered: true
X-Cloudmark-SP-Result: v=1.0 c=1 a=qXHbJdOSgogA:10 a=kCKDY91tEBMc+hi4YtGk8Q==:17  a=ZC2XL0bN5ncsqHAzrF8A:9 a=43HrGzjbEOJRXPGA4TK4IFJ2JOUA:4
Message-ID: <4B495A98.7040003@monai.ca>
Date: Sat, 09 Jan 2010 20:42:00 -0800
From: Steven Monai <steve+cygwin@monai.ca>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: question with cygwin.bat and Windows Scheduler
References: <27094829.post@talk.nabble.com> <4B494098.4040706@monai.ca> <27095212.post@talk.nabble.com>
In-Reply-To: <27095212.post@talk.nabble.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 2010/01/09 7:02 PM, aviate wrote:
> I was avoiding cron...but it might be most useful here.  Is there any
> way to
> hide the window popping up by Windows Scheduler??

Yes there is.

Install the Cygwin 'run' package (if not installed already). Use the
Windows Task Scheduler interface to schedule the following command line
for execution:

C:\cygwin\bin\run.exe bash -wait --login -c "/myfolder/myscript.sh"

That's it. Your bash script should run in a "hidden" console window at
the scheduled times.

What's really nice is that with 'run', you don't need to have a separate
.bat file. Oh, and I guess you won't need cron.

-SM
--

--
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

