[Erlang] How to start the server from the scheduler?

There is a computer with win server 2008r2, there is a socket server in erlang. It is necessary that when you start the server, sometimes crashes/reboots started erlang. But this is in General a simple task, was not implemented. I tried in two ways. The first one using cygwin and the ability to put a startup script
C:\cygwin\bin\dash.exe -l-c "/www/hawk/server_start.sh"

specifying a working directory, and without. Processes run but to connect to them is impossible.
Tried to create two actions in the task with the launch client and server - the same result

So how do you force start the server?
PS jackdaw on the maximum rights of the planner is worth it.
July 5th 19 at 00:04
2 answers
July 5th 19 at 00:06
And ports are opened?
Start your process not from LocalSystemĐ°, but from a normal user. You can create a special account for it, assign it the necessary rights.
started from my user with maximum rights - Lourdes commented on July 5th 19 at 00:09
You have not answered - network port service opens when you run through sheduler?
The above command works fine, if not through sheduler start?
What's in the logs? - Lucio commented on July 5th 19 at 00:12
About the port can not say anything, the server is started and listens to port localhost. If you run from console no problem. - Lourdes commented on July 5th 19 at 00:15
Look in the resource monitor. If it listens on on the outside that you not connect only from the same computer. - Lucio commented on July 5th 19 at 00:18
Looked. In General, the network has not found erlang processes only hanging on epmd 4369. - Lourdes commented on July 5th 19 at 00:21
July 5th 19 at 00:08
Why should cygwin ? Erlang works fine in Windows.
I don't mind. Tried a simple job with two steps. The result is the same. Start the server by the standard command with the option-detached - Lourdes commented on July 5th 19 at 00:11
>erl -name 'hawk_server@' -boot start_sasl -sasl sasl_error_logger \{file,\"${LOCATION_SCR}/server.log\"\} -detached -setcookie test-kernel inet_dist_listen_min 9000 9005 inet_dist_listen_max

and in log file there are no errors - Lucio commented on July 5th 19 at 00:14

Find more questions by tags ErlangWindows Server