Go Back   Tech Support Forum > Microsoft Support > Windows 7 Support, Windows Vista Support

Problem with schtask.exe

This is a discussion on Problem with schtask.exe within the Windows 7 Support, Windows Vista Support forums, part of the Tech Support Forum category. Hello, I'm attempting to create a task via schtask.exe with "wake computer to run this task" enabled. I can't find


Closed Thread
 
Thread Tools Search this Thread
Old 08-20-2010, 09:01 AM   #1
Registered Member
 
Join Date: Aug 2010
Posts: 152
OS: Win7



Hello,

I'm attempting to create a task via schtask.exe with "wake computer to run this task" enabled. I can't find out how. Two things I tried:

1. Create a task via schtasks.exe (in cmd) with parameters to check "wake computer to run this task". In internet documentation, it is written that there is not parameter for that.

2. Since my task is set to schedule (ONCE, time and date), I tried creating task in Task Scheduler manually, checking "wake computer to run this task" via GUI, and then changing it's start time via schtasks.exe with parameters "schtasks /Change /ST 22:30:00 /SD 2010/08/08 /TN MYTASK". I get error "parameter is incorrect". Guy on another forum told me that it is impossible to change start time and date via Schtasks.exe (really? in schtasks /change /? help file this command is listed as available).

So, what should I do? Where is my mistake?

__________________
laukejas is offline  
Old 08-22-2010, 07:20 AM   #2
Registered Member
 
Join Date: Aug 2010
Posts: 152
OS: Win7



Bump. Come on, people, please...

__________________
laukejas is offline  
Old 08-24-2010, 09:33 AM   #3
Registered Member
 
Join Date: Aug 2010
Posts: 152
OS: Win7



Bump. Help me, please... I'm totally stuck.
__________________
laukejas is offline  
Old 08-24-2010, 12:55 PM   #4
Alternative Computing
Moderator
 
hal8000's Avatar
 
Join Date: Dec 2006
Location: United Kingdom
Posts: 2,152
OS: Linux Mint 16 Petra (KDE), Arch Linux, Ubuntu 13.10 Raspberry Pi Model B (running Raspmc)

My System


Quote:
Originally Posted by laukejas View Post
Hello,

I'm attempting to create a task via schtask.exe with "wake computer to run this task" enabled. I can't find out how. Two things I tried:

1. Create a task via schtasks.exe (in cmd) with parameters to check "wake computer to run this task". In internet documentation, it is written that there is not parameter for that.

2. Since my task is set to schedule (ONCE, time and date), I tried creating task in Task Scheduler manually, checking "wake computer to run this task" via GUI, and then changing it's start time via schtasks.exe with parameters "schtasks /Change /ST 22:30:00 /SD 2010/08/08 /TN MYTASK". I get error "parameter is incorrect". Guy on another forum told me that it is impossible to change start time and date via Schtasks.exe (really? in schtasks /change /? help file this command is listed as available).

So, what should I do? Where is my mistake?

What you need to do is type your command in the command prompt then post the error message you are seeing. It may be that you are using wrong date format.

Bear in mind two things:
Internationalisation: date format 2010/08/08 assumes your locale is set for yyyy/mm/dd
If you want to wake your computer, make sure it is in one of the sleep states, hiberbation or suspend
__________________
hal8000 is offline  
Old 08-24-2010, 04:28 PM   #5
Registered Member
 
Join Date: Aug 2010
Posts: 152
OS: Win7



I already written that. Here I repeat:

1. I open CMD.
2. Write schtasks /Change /ST 22:30:00 /SD 2010/08/08 /TN MYTASK" and press return
3. get message "error: the parameter is incorrect".

If I try to use different date format, CMD notifies me of this error, and writes how I should write date - yyyy/mm/dd.

So?
__________________
laukejas is offline  
Old 08-25-2010, 11:42 AM   #6
Alternative Computing
Moderator
 
hal8000's Avatar
 
Join Date: Dec 2006
Location: United Kingdom
Posts: 2,152
OS: Linux Mint 16 Petra (KDE), Arch Linux, Ubuntu 13.10 Raspberry Pi Model B (running Raspmc)

My System


Quote:
Originally Posted by laukejas View Post
I already written that. Here I repeat:

1. I open CMD.
2. Write schtasks /Change /ST 22:30:00 /SD 2010/08/08 /TN MYTASK" and press return
3. get message "error: the parameter is incorrect".

If I try to use different date format, CMD notifies me of this error, and writes how I should write date - yyyy/mm/dd.

So?
Typical windows error message - none too helpful.

Check that the Task Scheduler service is running. Click start, run,type services.msc and hit <enter>. Scroll down the list to this service and click on it. The left column dialog should indicate if it is running or needs to be restarted.

If running, restart service and type your command again.
__________________
hal8000 is offline  
Old 08-25-2010, 05:53 PM   #7
Registered Member
 
Join Date: Aug 2010
Posts: 152
OS: Win7



Task Scheduler service is running, but all options is greyed out - obviously Windows doesn't want me to tamper with it. So I can't change a thing. But the service is running correctly - scheduled tasks are launching normally.

Try the command line I have problem with on your computer, and tell me the results. Do you get the same error?

And... Thanks for trying to help :)
__________________
laukejas is offline  
Old 08-25-2010, 06:09 PM   #8
Registered Member
 
Join Date: Aug 2010
Posts: 152
OS: Win7



Strange thing! I just tried creating new task from command line, and than changing it's time - and it works! Strangely enough, even though all settings for task created via GUI and via CMD are the same, I can change one, but get error with another. Any ideas why CMD can't edit task created via GUI?
__________________
laukejas is offline  
Old 08-28-2010, 05:12 PM   #9
Registered Member
 
Join Date: Aug 2010
Posts: 152
OS: Win7



Any comments?
__________________
laukejas is offline  
Old 10-25-2010, 05:04 PM   #10
Microsoft MVP
 
johnwill's Avatar

Microsoft Most Valuable Professional
 
Join Date: Sep 2002
Location: S.E. Pennsylvania, US
Posts: 50,845
OS: Windows 7, XP-Pro, Vista, Linux

My System


http://efreedom.com/Question/1-49794...p-Execute-Task

Apparently, you can create an XML file to do any advanced options you like by editing the XML file before creating the task.

__________________
If TSF has helped you, Tell us about it! or Donate to help keep the site up!

Microsoft MVP - Windows Desktop Experience
johnwill is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2


All times are GMT -7. The time now is 10:45 PM.


Copyright 2001 - 2014, Tech Support Forum

Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts