How to make Logstash.bat not wait

I want to trigger logstash.bat programmatically from C# code and i do not want the process to wait. How can i make the logstash.bat agent -f xyz to exit.

I tried specifying discover_interval=>0 and stat_interval=>0 in the file input plugin. It did not help.

-Madhu

There's no simple way of doing this. The links below provide further reading. I know you're not asking about log file deletion but the fundamental problem is that same, namely that the file input doesn't have a concept of "done".