A shell trick from
Net::SSH2 might help. This will start execution, then detach completely and allow the SSH2 connection to close. Possibly the syntax for the exec of the shell command can be used in the modules you are using to completely detach, or used in Cron.
#!/usr/bin/perl
use Net::SSH2;
# logon and object setup code omitted for clarity
my $chan = $ssh2->channel();
$chan->blocking(1);
$chan->exec("nohup /home/zentara/perlplay/net/zzsleep > foo.out 2> foo
+.err < /dev/null &");
$chan->send_eof;
exit;
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.