[erlang-questions] run_erl logfiles and cron
Szoboszlay Dániel
dszoboszlay@REDACTED
Thu Nov 28 01:29:26 CET 2013
Hi,
That's because cron doesn't allocate a pseudo tty for your program, so
your node starts up with the old shell. (Hopefully some Linux guru will
know how to fix it, but I have no idea.)
BR,
Daniel
On Wed, 27 Nov 2013 23:23:07 -0000, Jay Doane <jay.s.doane@REDACTED>
wrote:
> Hi,
>
> As an expedient, when the host is booted, I'm starting an erlang project
> with cron using something similar to the following in a crontab:
>
> @reboot ~/my_proj/rel/my_proj/bin/my_proj start
>
> where my_proj is built using "rebar compile generate".
>
> While this *does* actually start the erlang project, the "run_erl"
> logfiles it generates differ from those that are generated when the
> project is started from the command line using the same >command; each
> log entry is suffixed with a (node@REDACTED)1> prompt.
>
> For example, here's a snippet of log started via cron (weird suffixes
> highlighted in red)
>
> Eshell V5.9.2 (abort with ^G)
> (my_proj@REDACTED)1>
> =INFO REPORT==== 27-Nov-2013::19:41:54 ===
> Registering 0 remote connections on node
> 'my_proj@REDACTED'(my_proj@REDACTED)1>
> =INFO REPORT==== 27-Nov-2013::19:41:54 ===
> Node 'my_proj@REDACTED' connected with 0
> users(my_proj@REDACTED)1>
>
> And the same snippet later when started from bash:
>
> Eshell V5.9.2 (abort with ^G)
> (my_proj@REDACTED)1>
> =INFO REPORT==== 27-Nov-2013::19:56:42 ===
> Registering 0 remote connections on node
> 'my_proj@REDACTED'
> =INFO REPORT==== 27-Nov-2013::19:56:42 ===
> Node 'my_proj@REDACTED' connected with 0
> users
>
> Can anyone give me any clues as to why this might be happening, and
> especially suggestions on how to stop it?
>
> Thanks,
> Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131128/f6daa137/attachment.htm>
More information about the erlang-questions
mailing list