I'm looking to run a perl script in the background of a linux server. I have done this before with other programs but this new scripts is not working. The script I want to run in the background is a client that uses IO::Socket to connect to a server and transfer telemetry (gutted):
#! perl -slw use strict; use IO::Socket; use XML::Simple; #use Data::Dumper; $SIG{PIPE} = "IGNORE"; $\="\n"; my $img = '"http://updraft.unl.edu/~uas/uas/uas.png"'; my $post_time; my $test; my $xs = XML::Simple->new( RootName=>'Telemetry', XMLDecl => 1); for (;;){ my $tele_client = IO::Socket::INET->new( 'localhost:12345' ) or pr +int $!; my $way_client = IO::Socket::INET->new( 'localhost:56789' ) or pr +int $!; while( <$tele_client> ) { ################################# } print "SLEEP"; sleep 10; }
The script I use to run this program in the background follows (cshell script):
at now << EOF uas-client.pl EOF exit
For some reason this script wont run in the background of the linux server. typing  ps -u uas in the terminal after running the cshell the client script doesnt show up. The idea here is to have an autonomous client that will continuously try to connect to the localhost so that when the data is availible it does not require the user to manually start the script. Any ideas?

In reply to Running Client in Background by deadpickle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.