Re: schtask to run task now or in 2 minutes
From: Greg (Greg_at_discussions.microsoft.com)
Date: 12/22/04
- Next message: aaron: "Re: Using AT to schedule shutdown.exe to reboot win2003 machine"
- Previous message: Conic Ellipse: "RE: Using WMI for remote printer info"
- In reply to: Dave Patrick: "Re: schtask to run task now or in 2 minutes"
- Next in thread: Clay Calvert: "Re: schtask to run task now or in 2 minutes"
- Reply: Clay Calvert: "Re: schtask to run task now or in 2 minutes"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 22 Dec 2004 07:13:02 -0800
Any one have any thoughts/suggestions regarding the below question?
"Dave Patrick" wrote:
> You might want to ask this one in server.scripting
>
> forwarding to microsoft.public.windows.server.scripting
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "Greg" wrote:
> | Ok I got my task to schedule and to run using the following format...
> |
> | schtasks /create /tn prog-install /s %1 /u username /p password /tr
> | "\\%1\C$\Temp\progin.BAT" /sc once /st 23:00:00
> | schtasks /run /tn prog-install /s %1 /u username /p password
> |
> | As you can see above I had to imbed my username and password into each
> line.
> | Below I tried to use a set veriable for my password but this did not work
> | even though I did set the veriables at the begining of the script. I have
> | multiple sections of the batch file and don't want to have to put my
> username
> | and password all over the place. I'd like to just set two vaialbles in
> the
> | begining and "read" them when needed. Any ideas here?
> |
> | schtasks /create /tn prog-install /s %1 /u %UNAME /p %UNPW /tr
> | "\\%1\C$\Temp\progin.BAT" /sc once /st 23:00:00
> | schtasks /run /tn prog-install /s %1 /u %UNAME /p %UNPW
> | ===========================================
> | "Dave Patrick" wrote:
> |
> | > Try this one. It works for me.
> | >
> | > schtasks /create /tn NewTask /tr C:\WINDOWS\system32\calc.exe /sc once
> /st
> | > 18:00:00
> | >
> | > --
> | > Regards,
> | >
> | > Dave Patrick ....Please no email replies - reply in newsgroup.
> | > Microsoft Certified Professional
> | > Microsoft MVP [Windows]
> | > http://www.microsoft.com/protect
> | >
> | > "Greg" wrote:
> | > | Dave: Thanks for the info. I found that link but it does not help.
> I
> | > have
> | > | even tried the following in my batch file to get the thing to run but
> that
> | > | has not worked either...
> | > |
> | > | schtasks /create /tn prog-install /s %1 /tr "\\%1\C$\Temp\PROGIN.BAT"
> /sc
> | > | once /st 23:00:00
> | > | ping 1.1.1.1 -n 1 -w 10000 >NUL
> | > | schtasks /run /tn prog-install /s %1
> | > |
> | > | I thought if I scheduled the task and waited 10 seconds then told it
> to
> | > run
> | > | that would do it. The task got created but never ran.
> | >
> | >
> | >
>
>
>
- Next message: aaron: "Re: Using AT to schedule shutdown.exe to reboot win2003 machine"
- Previous message: Conic Ellipse: "RE: Using WMI for remote printer info"
- In reply to: Dave Patrick: "Re: schtask to run task now or in 2 minutes"
- Next in thread: Clay Calvert: "Re: schtask to run task now or in 2 minutes"
- Reply: Clay Calvert: "Re: schtask to run task now or in 2 minutes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|