Is there anything that my executable should do in order to be a
service. i have created services before with vb and have not
experienced issues. bat file is a simple one having this statemetn.
thin start -e production -p 3000
When i run it directly, it works. but i run it as part of the
servicem, the start up fails with this error
This is some service service failed to start due to the following
error:
The service did not respond to the start or control request in a
timely fashion.
My code for the service implementation is
require “win32/service”
include Win32
Create a new service
Service.create(‘some_service’, nil,
:service_type => Service::WIN32_OWN_PROCESS,
:description => ‘A custom service I wrote just for fun’,
:start_type => Service::AUTO_START,
:error_control => Service::ERROR_NORMAL,
:binary_path_name => ‘E:\TradingTools\torontotrader
\startServer.bat’,
:load_order_group => nil,
:dependencies => nil,
:service_start_name => ‘LocalSystem’,
:password => nil,
:display_name => ‘This is some service’
)