Change tasks runtime using schtasks (Vista)

S

Super Play

I am attemtping to use schtasks to change a taks run time using the command
line tool "schtasks"

As a test I am attempting to change the time of the scheduled defrag, using
the syntax:

SCHTASKS /Change /TN ScheduledDefrag /ST 15:00

This returns the following error:

ERROR: The specified task name "ScheduledDefrag" does not exist in the
system.

However if I run "schtasks /query " to quey all taks the folllowing is
retured

Folder: \Microsoft\Windows\Defrag
TaskName Next Run Time Status
========================================== ====================
===============
ManualDefrag N/A Ready
ScheduledDefrag 09/01/2008 01:00:00 Ready


Even in the Vista Scheduled taks GUI it shows the tasks name as
"ScheduledDefrag"


What is going on?
 
T

the wharf rat

Than I get another error: access is denied. I tried to use the local
admin account, but it does not work. My computer is member of a domain.
May you have an idea??

What happens if you try to use the task scheduler under computer
management? If all you want to do is schedule defrag you can do that right
from start->computer->hard disk drives and don't need the command line.

Forgive me if I don't understand what you're trying to do.
 
J

Jon

Rollexx said:
Hello,
I'm working on the same problem. I found the command to get the
defrag:

Change the command as follow:

SCHTASKS /Change /TN microsoft\windows\defrag\ScheduledDefrag /ST
15:00

Than I get another error: access is denied. I tried to use the local
admin account, but it does not work. My computer is member of a domain.
May you have an idea??




Try running the same command 'elevated'
 
J

Jon

Rollexx said:
@ Jon

what do you mean with "elevated"??

Rollexx


Right-click a link to cmd.exe > Run as administrator

then try the same command that you got an 'Access is denied' message with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top