Questions tagged [scheduled-task]

A scheduled-task means the launch of a program or script at predefined times or after specified time intervals.

662 questions
168
votes
11 answers

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I managed to make the window appear minimized by making…
144
votes
8 answers

How do I rename a task in Task Scheduled on Windows Server 2008 R2

I have some tasks in the Task Scheduler on Windows 2008 R2. I created them as the admin and I'm logged in as the admin. I have no easy way to rename the tasks. The only way I can is to export the task config to a XML file and re-import to a new…
Mark
  • 2,041
  • 6
  • 19
  • 18
52
votes
7 answers

Process runs slower as a scheduled task than it does interactively

I have a scheduled task which is very CPU- and IO-intensive, and takes about four hours to run (building source code, if you're curious). The task is a Powershell script which spawns various sub-processes to do its work. When I run the same process…
Charlie
  • 3,076
  • 2
  • 21
  • 13
48
votes
5 answers

How do I schedule a reboot on Linux?

I'd like to be able to schedule a server reboot at a specific time, but not regularly. How can I do this without futzing with adding and removing cron entries?
jldugger
  • 14,342
  • 20
  • 77
  • 129
30
votes
9 answers

Linux: Schedule command to run once after reboot (RunOnce equivalent)

I'd like to schedule a command to run after reboot on a Linux box. I know how to do this so the command consistently runs after every reboot with a @reboot crontab entry, however I only want the command to run once. After it runs, it should be…
Christopher Parker
  • 458
  • 2
  • 5
  • 12
29
votes
6 answers

What causes Scheduled Task error 2147942402?

Windows Server 2008 R2 (fully patched) I'm trying to run a scheduled task to move a specific type of files from C:\Windows\Temp to E:\Foo_blah_blah_blah_blah\Foo2 and for some reason am getting the following error: Task Scheduler failed to start…
Mike B
  • 11,871
  • 42
  • 107
  • 168
23
votes
3 answers

Start program on computer startup when nobody is logged on and show the window when someone does log on (OS: Windows)

I have a program that is launched on system startup using Task Scheduler on Windows Server 2012. The program must start even if the computer reboots automatially. Administrator is the account used to start the program, the option "Run whether user…
23
votes
1 answer

How to delete scheduled task from command line without confirmation? (schtasks delete)

I can create a task from command line like this: schtasks /create /tn SomeTask /tr "do.bat arg1 arg2" /sc ONCE /st 00:00:00 /sd 01/01/1991 and now I need to delete it. However the command needs to be confirmed and I don't know how to do that from…
22
votes
3 answers

Windows Server 2016 scheduled task schedule must be in future

We have a 2012 server that has about 20 scheduled tasks that are used for monitoring. We have built a 2016 server to replace it and as I move tasks to the new server I have run into an issue. Most of our tasks run every few minutes. In Server…
SteveB
  • 321
  • 1
  • 3
  • 6
20
votes
9 answers

Task scheduler scheduled task at startup not working

I have scheduled a task to be run at system startup. But its not working. When I run the task manually, it is working. Below are the screenshots of the settings. What have I done wrong here? This task executes a bat file that launches a process.…
18
votes
1 answer

Task Scheduler 2.0: Difference between "Stop task if..."

Using the Task Scheduler in Windows Server 2008 R2 or Windows 2012, etc... What is the difference between this setting: and this setting on the same task: Does one take precedence over the other? Do they conflict?
Ryan Ries
  • 55,481
  • 10
  • 142
  • 199
17
votes
3 answers

What is the default working directory for a scheduled task in Windows 2008 R2?

Trying to figure out where the output of a long running scheduled task is being saved. Presumably, it's in the working directory of the task. Unfortunately, the "Start in" option was not set. The scheduled task is using the "System" account. Any…
Belmin Fernandez
  • 10,799
  • 27
  • 84
  • 148
17
votes
8 answers

How can I schedule a server restart from command line on Windows 2012?

I would like to schedule a one-time server restart, e.g. to finish installing updates early in the morning. How can I do this from the command line on Windows 2012? On Windows 2008, I would have used the at command, at 2am shutdown -r -f -c…
user37944
17
votes
2 answers

Windows Scheduled Task - Error 2147943711 for "on startup" task

I have a onstartup task that I want to automatically run, regardless of if someone is logged in or not. I've set it up as Run whether user is logged in or not, Do not store password1, and Run with highest privileges, which I assume would work,…
glasnt
  • 637
  • 2
  • 6
  • 21
16
votes
1 answer

Windows Scheduled Task: What are the minimum user rights needed for the task?

At the moment, I have task that is configured to run as user "automatictask" But the task will not run, "unable to start" is shown. When I add this user to the Administrators group, then the task runs fine. But in real life.... I want this user to…
Jonesome Reinstate Monica
  • 5,445
  • 10
  • 56
  • 82
1
2 3
44 45