muralidharan has asked for the wisdom of the Perl Monks concerning the following question:
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!!!!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can Win32::Scheduler Module used to schedule a remote host?
by BrowserUk (Patriarch) on Feb 09, 2010 at 15:36 UTC | |
by muralidharan (Novice) on Feb 10, 2010 at 04:29 UTC | |
by BrowserUk (Patriarch) on Feb 10, 2010 at 04:44 UTC | |
by muralidharan (Novice) on Feb 10, 2010 at 05:01 UTC | |
by ikegami (Patriarch) on Feb 10, 2010 at 06:28 UTC |