delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/12/28/15:30:18

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3C2CD639.1000607@cportcorp.com>
Date: Fri, 28 Dec 2001 15:29:45 -0500
From: Peter Buckley <peter DOT buckley AT cportcorp DOT com>
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: Scott Goldstein <sdgoldst AT MailAndNews DOT com>, cygwin AT cygwin DOT com
Subject: Re: Starting program under bash as Scheduled Task
References: <3C2D1B87 AT MailAndNews DOT com>

Have you looked at using cron? That would be the unixy way of doing 
things. But you can invoke bash and give it a script and some parameters 
in your "sh.bat" file-

at 12:15 cmd /c "c:\bla\bla\sh.bat"

contents of sh.bat-

bash -i /cygdrive/c/bla/bla/MyScript parameter1 parameter2

(the -i makes the shell interactive, forcing ~/.bashrc to be run- check 
out 'bash -c "help set"')

HTH,
Peter



Scott Goldstein wrote:

> Won't this just run bash at 12:15?
> 
> What I want to do is run a script, "MyScript", within a bash environment at 
> 12:15.
> 
> So, I want to emulate the following:
> 
> 1.  Start bash.  .bashrc is executed and shell opens with a prompt.
> 2.  At the prompt, run MyScript
> 
> Can this be done?
> 
> Thanks.
> 
> Scott
> 
> 
>>===== Original Message From "Kredba" <kredba AT mbox DOT dkm DOT cz> =====
>>Be sure, that the task manager service is running.
>>
>>Open cmd.exe and type there command similar to this :
>>
>>at 12:15 cmd /c "c:\bla\bla\sh.bat"
>>
>>In the batch file you can call bash --rcfile .
>>
> 
> ------------------------------------------------------------
> "Just a mirror for the sun...
>  My smiling eyes are just a mirror for the sun."
> ------------------------------------------------------------
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 


-- 
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]

--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019