<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi guys,<div><br></div><div>  I was trying to call gen_server:cast from a escript file, everything that used to work well in erl shell won't work in escript, I have no idea what made the difference, here is the code, could anyone help me to find a clue? </div><div><br></div><div><br></div><div><br></div><div><div>#!/usr/bin/env escript</div><div><br></div><div>%%! -name bk@test -setcookie budget_keeper</div><div><br></div><div>main(Argv) -></div><div>    {Node, File} = case Argv of</div><div>                       [] -></div><div>                           <b>{'budget_keeper@127.0.0.1', "cache"</b>};</div><div>                       [F] -></div><div>                           {'budget_keeper@127.0.0.1', F};</div><div>                       [N, F] -></div><div>                           {N, F}</div><div>                   end,</div><div>    io:format("~p ~p ~p ~p~n", [node(), erlang:get_cookie(), Node, File]),</div><div>    gen_server:cast({bk_main, Node}, {dump_data, File}).</div></div><div><br></div><div><br></div><div><br></div><div>As shown above, the target process is called "bk_main" which is on the node 'budget_keeper@127.0.0.1', I have run the same code in erl shell, and bk_main can get the notice, but nothing happened when I ran the same code in this script.</div><div><br></div><div>Best regards</div><div>Zhiqian</div>                                         </div></body>
</html>