Scheduled Tasks

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.perform_maintain (More info?)

How can I set through the command prompt the option "run only if logged on"
using the schtasks facility?

Hope somebody can help,

Will
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.perform_maintain (More info?)

To schedule a task that runs every 70 days if I am logged on
The following command schedules a security script, Sec.vbs, to run every 70
days. The command uses the /mo parameter to specify an interval of 70 days.
It also uses the /it parameter to specify that the task runs only when the
user under whose account the task runs is logged onto the computer. Because
the task will run with the permissions of my user account, then the task
will run only when I am logged on.

schtasks /create /tn "Security Script" /tr sec.vbs /sc daily /mo 70 /it

Note

. To identify tasks with the interactive-only (/it) property, use a
verbose query (/query /v). In a verbose query display of a task with /it,
the Logon Mode field has a value of Interactive only.



Full listing off options is available here
http://tinyurl.com/djsxe


--
Regards
Mark Dormer
How to ask a newsgroup question:
http://support.microsoft.com/kb/555375


"Will Manley" <WillManley@discussions.microsoft.com> wrote in message
news:683A2FCB-388D-4513-8AD5-85A2E72CE87B@microsoft.com...
> How can I set through the command prompt the option "run only if logged
> on"
> using the schtasks facility?
>
> Hope somebody can help,
>
> Will
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.perform_maintain (More info?)

Hi Mark,

I have XP SP2 but the /it option is not available to me? I even copied your
command line exactly and it rejected the /it option. I think that option is
Windows 2003 only?

Any other ideas?

Will

"Mark Dormer" wrote:

> To schedule a task that runs every 70 days if I am logged on
> The following command schedules a security script, Sec.vbs, to run every 70
> days. The command uses the /mo parameter to specify an interval of 70 days.
> It also uses the /it parameter to specify that the task runs only when the
> user under whose account the task runs is logged onto the computer. Because
> the task will run with the permissions of my user account, then the task
> will run only when I am logged on.
>
> schtasks /create /tn "Security Script" /tr sec.vbs /sc daily /mo 70 /it
>
> Note
>
> . To identify tasks with the interactive-only (/it) property, use a
> verbose query (/query /v). In a verbose query display of a task with /it,
> the Logon Mode field has a value of Interactive only.
>
>
>
> Full listing off options is available here
> http://tinyurl.com/djsxe
>
>
> --
> Regards
> Mark Dormer
> How to ask a newsgroup question:
> http://support.microsoft.com/kb/555375
>
>
> "Will Manley" <WillManley@discussions.microsoft.com> wrote in message
> news:683A2FCB-388D-4513-8AD5-85A2E72CE87B@microsoft.com...
> > How can I set through the command prompt the option "run only if logged
> > on"
> > using the schtasks facility?
> >
> > Hope somebody can help,
> >
> > Will
>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.perform_maintain (More info?)

It appears that switch isn't supported in XP, now why do they do that?
I'll see if I can find another way

--
Regards
Mark Dormer
How to ask a newsgroup question:
http://support.microsoft.com/kb/555375


"Will Manley" <WillManley@discussions.microsoft.com> wrote in message
news:6F2D0BE7-C0E3-41A9-BB6C-7C92D6AE4BAD@microsoft.com...
> Hi Mark,
>
> I have XP SP2 but the /it option is not available to me? I even copied
> your
> command line exactly and it rejected the /it option. I think that option
> is
> Windows 2003 only?
>
> Any other ideas?
>
> Will
>
> "Mark Dormer" wrote:
>
>> To schedule a task that runs every 70 days if I am logged on
>> The following command schedules a security script, Sec.vbs, to run every
>> 70
>> days. The command uses the /mo parameter to specify an interval of 70
>> days.
>> It also uses the /it parameter to specify that the task runs only when
>> the
>> user under whose account the task runs is logged onto the computer.
>> Because
>> the task will run with the permissions of my user account, then the task
>> will run only when I am logged on.
>>
>> schtasks /create /tn "Security Script" /tr sec.vbs /sc daily /mo 70 /it
>>
>> Note
>>
>> . To identify tasks with the interactive-only (/it) property, use a
>> verbose query (/query /v). In a verbose query display of a task with /it,
>> the Logon Mode field has a value of Interactive only.
>>
>>
>>
>> Full listing off options is available here
>> http://tinyurl.com/djsxe
>>
>>
>> --
>> Regards
>> Mark Dormer
>> How to ask a newsgroup question:
>> http://support.microsoft.com/kb/555375
>>
>>
>> "Will Manley" <WillManley@discussions.microsoft.com> wrote in message
>> news:683A2FCB-388D-4513-8AD5-85A2E72CE87B@microsoft.com...
>> > How can I set through the command prompt the option "run only if logged
>> > on"
>> > using the schtasks facility?
>> >
>> > Hope somebody can help,
>> >
>> > Will
>>
>>
>>
 
G

Guest

Guest
I'm looking at exactly the same thing...

It seems you cant get an 'AT' command to run as the current user, and the schtasks cant set the "interactive" flag.

Did you find any workaround??
 

djbarnes

Honorable
Jun 14, 2012
1
0
10,510
I'm looking at exactly the same thing...

It seems you cant get an 'AT' command to run as the current user, and the schtasks cant set the "interactive" flag.

Did you find any workaround??

I know its 2 years too late, but anyway:

I have worked around this by using the windows 2003 copy of the schtasks.exe file

just copy it onto the xp machine and use it,
you can rename it if its easier eg. schtasks2003.exe and just use it in the same folder as your batch file.
I have uploaded both a 32 and 64 copy of it here:
http://fbe.am/8kb

Cheers,

Dan