Application as Service - Advanced tab

The Advanced tab defines a variety of additional advanced service options.

Output Capture

Option Purpose
Redirect this file to STDIN
Supply the file name you want to redirect data or parameters from to application's STDIN (standard input) stream. This option could be useful if you want to pass the number of parameters to your console application.
Redirect STDOUT and STDERROR to the file
Specify the file name you want to redirect application's STDOUT (standard output) and STDERROR (standard error) streams to. This option could be useful if you want to log console application's output and errors streams.

Service lifecycle

Option Purpose
Upon program exit

Specify how Service Control Manager should manage the service on application termination by selecting one of the following options:
"Take no action" - the service remains running, however, application won't be restarted;
"Restart the program after" - attempt to restart the application again after specified time;
"Shutdown the service" - will terminate the service gracefully by sending "Stop" command.

Note: you should remember that "Restart the program after" option impacts on schedule. In other words, if your schedule application would be launched several times (if there are two "Start from" tasks in schedule, for example) you should enable "Restart the program after" option to successful schedule proceeding. Moreover your schedule application will be launched second time accordingly to schedule but not accordingly to "Restart the program" value. If "Restart the program after" is disabled the second task in schedule will not be proceed.

Flap detection
If "Restart the program after" option is used, you are able to specify the behavior of the service if the program was closed several times in a row. For instance, if the application was closed 3 times (no matter intentionally closed or due to a crash), you may wish not to launch it again by choosing "Shutdown the service after" and specifying the number of retries at the corresponding field. If you don't need this option, simply select "Take no action".

Shutdown program

Option Purpose
Graceful shutdown
Tick this checkbox if you want your application exited correctly on the service halt. This option is especially important for console applications where correct termination is a must. (note, that this feature does not close Windows application simply, it searches for popup windows after sending command to close as well and presses buttons in the following order: IDNO IDOK IDABORT IDYES IDCANCEL)
Console program stop
If graceful shutdown is used, you can use this checkbox to stop console program using CTRL+break or CTRL+C events.
Max shutdown delay
Define the number of milliseconds before the application will be forced to exit (in case it is not responding).