Title: RE: Running Perl Script through Windows 2000 Task Scheduler
i am using Task Scheduler GUI, and on NT i am using system("net send mkhan hello") and its working but not on 2000..
-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 1:59 PM
To: 'Khan, Moin'; Timothy Johnson; 'Dutrieux Yves'
Cc: [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler

When you're running it on Windows 2000, are you using the AT command, or are you using the Task Scheduler GUI?  Also, are you sure it works fine with single backslashes in the system call? 
-----Original Message-----
From: Khan, Moin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 1:54 PM
To: 'Timothy Johnson'; Khan, Moin; 'Dutrieux Yves'
Cc: [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler

hmm, interesting thing is that, when i am running script through NT Scheduler its work fine, only having problem on Windows 2000, so i dont think its something wrong on script? wht you think?
-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 9:56 AM
To: 'Khan, Moin'; 'Dutrieux Yves'
Cc: [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler

When you're running the second part, you should be using single quotes or double backslashes.
 
system("c:\\winnt\\system32\\net.exe send mkhan Test");
 
or
 
system('c:\winnt\system32\net.exe send mkhan Test');
 
 
-----Original Message-----
From: Khan, Moin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 9:50 AM
To: 'Dutrieux Yves'; Khan, Moin
Cc: [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler

well, as i mentioned in my previous email, batch file is work fine thru system cmd, for eg,
system("test.bat");
only problem is when i try
system("net send mkhan Test")
or
system("c:\winnt\system32\net.exe send mkhan Test")
both not worked, maybe i missing something , have no clue!
Thanks,
-Moin Khan

-----Original Message-----
From: Dutrieux Yves [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:06 PM
To: 'Khan, Moin'
Cc: [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler


Be careful,
 
system("c:\somewhere\test.bat");
should be...
system("c:\\somewhere\\test.bat");
I think.
 
Have you try with AT /interactive to see the batch in interactive mode and
perhaps see the error displayed ?
 
Yves

-----Original Message-----
From: Khan, Moin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 2:40 AM
To: 'Timothy Johnson'; Khan, Moin; [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler


the set output not have any path variable, and yes, through batch file its
working but when i write the complete command in system() it didnt..

-----Original Message-----
From: Timothy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 12:53 PM
To: 'Khan, Moin'; [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler


Yes, you can send the message form a Win2k server.  Another thing to check
on the scheduler thing:  Try making a batch file with this in the contents:
 
  set > c:\set.txt
 
Then check set.txt, and make sure that c:\winnt\system32 or c:\windows
system32 is in the path.  Net is not an internal command, it is an exe.  I
suspect that the system environment has been changed somehow.  Anyway, you
can do what you were trying to do by changing your batch file to:
 
c:\winnt\system32\net.exe send moin test
 
 

-----Original Message-----
From: Khan, Moin [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 12:09 PM
To: [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler



well, i tried all methods that everyone mentioned but it didnt work, still
confuse when i directly run the script from a command prompt its work, and
when trying from Win 2000/NT schedular it didnt. anyhow, I use the
Win32::Message extension to use the same thing as mentioned in Roths Book.

Roth, I have a question, can i use that extension to send message from win
2000 server, or i only send message from NT?
thanks,
-Moin Khan

-----Original Message-----
From: Jing Wee [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent: Friday, May 31, 2002 12:54 PM
To: [EMAIL PROTECTED]
Cc: Khan, Moin; [EMAIL PROTECTED]
Subject: RE: Running Perl Script through Windows 2000 Task Scheduler


I think the problem is the missing path in
         system("test.bat")
unless test.bat is in the same directory as the Task Scheduler.

So, add the path in e.g. system("c:\somewhere\test.bat");

Jing Wee


>In your batch file, specify the full path to the net.exe command, i.e.
>
>c:\winnt\system32\net send moin TEST
>    or
>c:\windows\command\net send moin TEST
>
>Sometimes the task scheduler doesn't see the file path, and needs explicit
>directions to get to
>the file.
>
>Hope this helps,
>
>--Chuck
>
>--- "Khan, Moin" <[EMAIL PROTECTED]> wrote:
> > Yes, i tried running script but same result, and yes permission are set
> > fine, the user have local admin on machine, I did one more thing,
> create the
> > batch file and only content of the batch is 'net send moin TEST', and
use
> > that batch file in my script in as system("test.bat"), and now when I
run
> > the script I got the error on console window as net is unknown command,
wht
> > i realize is that when i am running the script in command window it able
to
> > use shell commands but when i am executing script thru scheduler it not
> able
> > to execute shell commands, any comments?
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com <http://fifaworldcup.yahoo.com
>_______________________________________________
>Perl-Win32-Admin mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
<http://listserv.ActiveState.com/mailman/mysubs

Reply via email to