Hello Monks!!! The Win32::Scheduler module works fine in local machine to schedule a perl file. But when trying to connect to a remote go grid machine, it doesn't, and creates the job in local machine itself. There is a method - SetTargetComputer() where the host machine name is given. But i'm unaware where to give the Go grid machine's password. Here is my code

$scheduler = Win32::TaskScheduler->New(); $scheduler->SetTargetComputer("173.1.105.147"); $tsk="my_task"; %trig=( 'BeginYear' => 2010, 'BeginMonth' => 02, 'BeginDay' => 9, 'StartHour' => 13, 'StartMinute' => 06, 'TriggerType' => $scheduler->TASK_TIME_TRIGGER_DAILY, 'Type'=>{ 'DaysInterval' => 1, }, ); $scheduler->Activate($tsk); foreach $k (keys %trig) {print "$k=" . $trig{$k} . "\n";} $scheduler->NewWorkItem($tsk,\%trig); $scheduler->SetApplicationName("cmd.exe"); $scheduler->SetAccountInformation('usrname','pwd'); #username and pwd +for the particular task $scheduler->Save(); $scheduler->End();

I just want to schedule a job in remote windows machine using this module. Thank You Monks!!!!!!


In reply to Can Win32::Scheduler Module used to schedule a remote host? by muralidharan

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.