Questions tagged [schtasks]
19 questions
5
votes
1 answer
Permissions or ACL for Scheduled Tasks
I am on a Windows Server 2012 R2 and the logged in account is a member of Administrators.
This is a screen shot of Task Scheduler:
I have tasks in folders another administrator created: RPA and Test. Running schtasks /query, it lists only the \ and…
Old Geezer
- 355
- 7
- 21
5
votes
1 answer
Need help using SCHTASKS on Windows Server 2008/2012
I'm executing the following command :
schtasks /create /tn "test" /ru system /SC onevent /TR "test" /F /RL HIGHEST /MO "*[System[Provider[@Name='SupportAssistService'] and EventID=900]]" /EC APPLICATION
[Using the command references for SCHTASKS…
Rohitdev
- 151
- 2
5
votes
2 answers
How can I script schtasks so it doesn't need a password?
I'm trying to install some software using a batch script and using schtasks to start a service every day at midnight.
The script works fine, but it prompts for a password, which causes the script to hang. I've tried using the '/RU "user" /RP ""'…
samoz
- 1,943
- 6
- 18
- 20
4
votes
1 answer
How to schedule a task to run when the windows server is reboot or shutdown?
I would like to be able to fire a task before a windows server 2012 is reboot or shutdown.
I can see task scheduler supports an 'on startup' trigger. Unfortunately there is similar event for reboot or restart. Is there anyway I can achieve the my…
Anthony Kong
- 2,976
- 10
- 53
- 91
4
votes
2 answers
Add a new scheduled task from command line with "wake the computer to run this task" on
I'm trying to add a scheduled task to start every day at a fixed hour even if the computer is in sleep mode. In the Windows Scheduled Tasks Manager UI, there is a check-box labeled "Wake the computer to run this task".
How can I set this option…
Francis
- 381
- 2
- 6
- 17
4
votes
2 answers
How to schedule a task for multiple days of a month using schtasks.exe?
Since task scheduler API has been changed after Vista & Server 2008, scheduling a task with schtasks is (as much as I know) the only way that works on both Windows 2003 Server and Windows 2008 Server.
I need to create a task that will run every on…
dereli
- 177
- 1
- 2
- 5
2
votes
2 answers
Unable to see Scheduled Task even with access rights to SYSTEM32\Tasks
I have a follow-up question to this.
I have a task folder RPA with two tasks as follows:
I created these two tasks myself using the Task Scheduler UI (as in above image). My trouble is I am now unable to see SPSBatch using SchTasks.exe:
I am user…
Old Geezer
- 355
- 7
- 21
2
votes
1 answer
Which port is used for running schtasks.exe in a remote computer?
I was trying to extract the list of scheduled tasks in a number of remote computers, and found this schtasks.exe. I put this inside a powershell script and run against a list of servers, and almost 80% of the servers returned the results. This was…
screenslaver
- 101
- 3
- 12
2
votes
1 answer
Task Scheduled Powershell Script Not Shutting Down machine
I have a task running on a Hyper-V server setup as such:
schtasks /CREATE /TN AutoShutdown /RU "SYSTEM" /TR "Powershell \"C:\AutoShutdown.ps1\"" /SC ONSTART
It runs properly (as far as I can tell) however the script has a line to shutdown the…
Gavin Greenwalt
- 151
- 6
1
vote
1 answer
Windows task fails but throws no errors and writes no output
This creates a task that works and writes to a file:
schtasks --% /create /tn "test" /sc minute /mo 10 /ru SYSTEM /tr "powershell get-date | out-file -Encoding:ascii c:\log.log"
This does not create a log file and i cant see any errors:
schtasks…
red888
- 4,069
- 16
- 58
- 104
1
vote
2 answers
Trigger a scheduled task "At task creation/modification" schtasks
I am creating a schedules task to run just before it's created and deleted after it runs.
I am using the tool, schtasks to create the scheduled task, but i havent found the parameter to run the task "At task creation/modification"
schtasks /create…
kimo pryvt
- 421
- 4
- 11
- 22
1
vote
2 answers
SchTasks giving out error (0x1) on Windows 2008 R2
i have a powershell script which creates scheduled tasks as a part of automation process and my syntax is following;
schtasks /create /s ServerName /u $username /p $password /ru $username /rp $password /sc once /sd $StartDate /st $StartTime /tn…
Darktux
- 827
- 5
- 20
- 36
1
vote
1 answer
How do I start an elevated process with schtasks.exe?
GUI vs Command-Line
The task scheduler GUI provides an option to run the scheduled task in an elevated context ("Run with highest privileges"), e.g.
I cannot find a corresponding flag for schtasks.exe. The closest thing I can find is to export an…
mojo
- 217
- 1
- 4
- 12
0
votes
0 answers
How to use schtasks to query a remote server as a non-admin?
I want to query a remote server's tasks:
schtasks /query /s
ERROR: Access is denied.
The account I am running this from is not a local admin on the remote server, but I have the following set up:
The account has read and execute…
Frikster
- 101
- 1
0
votes
3 answers
schtasks.exe adding repeat every 10 min when not desired
I am trying to create a scheduled task from the command line. I need the task to run every day at 7:05pm and run for a maximum duration of 1 hour. Just once until the next day.
Here is my command:
schtasks.exe /create /ru DeployUser /rp '********'…
Rob S.
- 101
- 1
- 3