Run a script in the Background

Francis Litterio flitterio@gmail.com
Tue Sep 9 16:17:00 GMT 2008


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/



More information about the Cygwin mailing list