This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Run a script in the Background


Diogo Branco wrote:

> Hi, i have Cygwin install on a Windows 2003 Machine and i whant to run a
> script on the background from time to time how can I accomplish that?

You can do this in a Bash shell:

	$ myscript &> output &

You may want to follow the above command with:

	$ disown

so that the script continues to run when you exit Bash.  This can also
be achieved by starting the script with the "nohup" command.

If you want to launch the script from a Windows shortcut, make the
shortcut run this command:

	cygstart --hide bash c:/path/to/myscript

You will probably want to make the shortcut start minimized, otherwise
you see a console window flash on the screen briefly when you launch the
shortcut.
--
Fran


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]