xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:
I open a cmd window and run it, It seems work very well. So I create a new scheduled task like below:# omit parameters use strict; use warnings; use Net::Telnet; sub init{ read_par(); #telnet_login("sh /backup/auto_backup.sh > /backup/backup.log &"); telnet_login("echo 1 >>1.txt"); #just a test } init(); sub telnet_login{ my $command = shift; my $tl = Net::Telnet->new() or die "???\n"; $tl->open($remote_server); $tl->login($username,$password); my @output = $tl->cmd($command);
But it's very strange, It doesn't work totally! I can see a cmd window flash on the screen on specified time. but on unix side, 1.txt file doesn't change!run: C:\perl\bin\perl D:\snippet.pl start in: C:\perl\bin and enabled check box is also ticked. #please see scheduled task for real appreance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help! perl in scheduled task doesn't work!
by BrowserUk (Patriarch) on Oct 18, 2007 at 10:13 UTC | |
|
Re: Help! perl in scheduled task doesn't work!
by moritz (Cardinal) on Oct 18, 2007 at 10:02 UTC | |
|
Re: Help! perl in scheduled task doesn't work!
by eyepopslikeamosquito (Archbishop) on Oct 18, 2007 at 12:10 UTC | |
|
Re: Help! perl in scheduled task doesn't work!
by andreas1234567 (Vicar) on Oct 18, 2007 at 10:24 UTC | |
|
Re: Help! perl in scheduled task doesn't work!
by LittleGreyCat (Scribe) on Oct 18, 2007 at 13:24 UTC | |
|
Re: Help! perl in scheduled task doesn't work!
by xiaoyafeng (Deacon) on Oct 19, 2007 at 01:52 UTC | |
by andreas1234567 (Vicar) on Oct 19, 2007 at 05:50 UTC | |
|
Re: Help! perl in scheduled task doesn't work!
by Anonymous Monk on Nov 13, 2009 at 18:14 UTC | |
by Anonymous Monk on Feb 16, 2010 at 13:33 UTC |