Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Create a scheduled task which runs at startup?

HTVi
TV Discussion Newsgroups

Create a scheduled task which runs at startup?
"Markus" <gillmeis (at) in.tum.de> 6/3/2007 10:40:30 PM
Hi together,

i'm currently searching for a way to create a scheduled task that should run
when windows starts.

I took a look at the sample for the Win32_ScheduledJob-Create-Method, but I
think, this method can only create tasks with given times and not with a "at
startup"-flag. (http://msdn2.microsoft.com/en-us/library/aa394399.aspx)

Does anyone know a solution or can give me a hint?

Thanks,
Markus

PS: The problem is, that i can't use "schtasks /create ..." for this,
because it has also to work for windows 2000-clients, which dont have the
tool "schtasks" but "at" (which is not very powerful)


Re: Create a scheduled task which runs at startup?
"Lanwench [MVP - Exchange]" <lanwench[ at ]heybuddy.donotsendme.unsolicitedmail.atyahoo.com> 6/4/2007 12:07:26 AM
Markus <gillmeis (at) in.tum.de> wrote:
[Quoted Text]
> Hi together,
>
> i'm currently searching for a way to create a scheduled task that
> should run when windows starts.

Then it isn't really a scheduled task, which is by definition something that
runs at a specific time/date. Sounds like what you're looking for is a
startup script. You can configure these in group policy (or local policy, if
you aren't using AD). Try posting in m.p.windows.group_policy for more help.



>
> I took a look at the sample for the Win32_ScheduledJob-Create-Method,
> but I think, this method can only create tasks with given times and
> not with a "at startup"-flag.
> (http://msdn2.microsoft.com/en-us/library/aa394399.aspx)
> Does anyone know a solution or can give me a hint?
>
> Thanks,
> Markus
>
> PS: The problem is, that i can't use "schtasks /create ..." for this,
> because it has also to work for windows 2000-clients, which dont have
> the tool "schtasks" but "at" (which is not very powerful)



Re: Create a scheduled task which runs at startup?
"Shenan Stanley" <newshelper[ at ]gmail.com> 6/4/2007 1:37:10 AM
Markus <gillmeis (at) in.tum.de> wrote:
[Quoted Text]
> i'm currently searching for a way to create a scheduled task that
> should run when windows starts.
<snip>

Lanwench [MVP - Exchange] wrote:
> Then it isn't really a scheduled task, which is by definition
> something that runs at a specific time/date. Sounds like what
> you're looking for is a startup script. You can configure these in
> group policy (or local policy, if you aren't using AD). Try posting
> in m.p.windows.group_policy for more help.

Hmmm...
Scheduled tasks *can* be created that run at system startup....
I utilize them quite a bit.

*System Startup* is a specific time. ;-)

This line creates a task on the local machine that runs everytime a system
is started...
--- below here is a single line (watch for wrap) ---
schtasks /create /RU system /SC ONSTART /TN "Returned to Service Logging"
/TR "c:\restarted.cmd"
--- above here is a single line (watch for wrap) ---

Even runs as the SYSTEM user.

However - the OP states he cannot use SCHTASKS because it is not found in
Windows 2000 - but I don't believe that would limit the OP... As SCHTASKS
can create tasks on remote systems and if I recall correctly - works to
create tasks on Windows 2000...

Same thing - remote computer...
--- below here is a single line (watch for wrap) ---
schtasks /create /S RemoteSystemNameorIP /RU system /SC ONSTART /TN
"Returned to Service Logging" /TR "c:\restarted.cmd"
--- above here is a single line (watch for wrap) ---

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html


Re: Create a scheduled task which runs at startup?
"Markus" <gillmeis (at) in.tum.de> 6/5/2007 8:39:21 AM
Thanks for your help! I'm already familiar with the schtasks-tool.
Unfortunately I have no chance to use schtasks, I've to create the tasks
locally on a windows 2000 machine. Is there any chance to do that?


Re: Create a scheduled task which runs at startup?
"Lanwench [MVP - Exchange]" <lanwench[ at ]heybuddy.donotsendme.unsolicitedmail.atyahoo.com> 6/5/2007 1:25:00 PM
Markus <gillmeis (at) in.tum.de> wrote:
[Quoted Text]
> Thanks for your help! I'm already familiar with the schtasks-tool.
> Unfortunately I have no chance to use schtasks, I've to create the
> tasks locally on a windows 2000 machine. Is there any chance to do
> that?

I still don't understand why you can't use group policy (or, if you aren't
in a domain environment, local policy) settings to do this.


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen