Skip to main content
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
18 votes

Windows 7 Task Scheduler is giving me an error saying "The specified account name is not valid"?

The issue was after changing my PC name, tasks I had created in Task Manager still had the User in Security Options set to the old PC name. The way to fix this was for every task: Task Manager > ...
Alex F's user avatar
  • 440
16 votes

Windows 10 console stops running if I click in the console window

The Windows 10 command prompt pauses when you click so that you can copy and paste text without that text changing or moving. You can escape this copy mode by simply right clicking in the console ...
Worthwelle's user avatar
  • 4,698
14 votes

Adding route automatically after a successful VPN connection in Windows 10

On Win 10, Powershell has a cmdlet available that adds routes on VPN connection and removes them again when the VPN is disconnected: Add-VpnConnectionRoute. It works without having to specify the ...
Vorona's user avatar
  • 141
14 votes

How to predefine file/directory parameter to xcopy

How do I force xcopy to assume the destination is a file not a directory? Add an asterix * to the destination file name, like so: C:\IAM\New_ADuser_mustang.ps1* When copying a single file with ...
DavidPostill's user avatar
  • 158k
10 votes

Task scheduler - What is "Wait for idle for"?

You need to have an actual trigger (e.g. 6pm everyday) for your task, otherwise "wait for idle for" does not make sense. Now you read it as: At 6pm everyday, if the computer is not idle yet, wait ...
r3mark's user avatar
  • 201
9 votes

it opens "open with" prompt whenever scheduled task run

Old question, but I ran across it too and it helped me solve my problem, so I figured I'd share what worked for me. Setting the command to C:\Windows\System32\wscript.exe and passing the path to my ...
William Brawner's user avatar
9 votes

Windows 10 scheduled tasks are not running

I have a laptop and the same problem occured to me. I resolved the issue DISABLING the option "Start the task only if the computer is on AC power" on the "Conditions" tab and "Power" group. My ...
user743667's user avatar
8 votes

How to power-on Windows 10 PC, run task, then shut down again

If you can have your computer turn itself on, Task Scheduler is certainly the way to run a task and shut down after either as part of the job or task (shutdown /s). Task Scheduler is suited to this. ...
John's user avatar
  • 50.3k
7 votes

Display message box from Task Scheduler on top of all other windows

Also see In case of link death, I'll summarize here: Open Windows Task Scheduler (search 'Task Scheduler' ...
Wanderspeak's user avatar
7 votes

How to make TaskScheduler fail when the task returns result different from 0

It is possible to "restart" the task if it fails. Use following code in the batch script to create a system error event: eventcreate /ID 100 /SO "Your Script Name" /L APPLICATION /T ERROR /D "...
schulle877's user avatar
7 votes

Search Task Scheduler Library

You can do this with Powershell. Example: Get-ScheduledTask | where {$_.settings.waketorun} Got this information from here Here's my results: powershell results I'm assuming from the format ...
Jackary Smith's user avatar
7 votes

How does a computer sleep/wait without using all of its processing power?

Computers have hardware timers that can be used to signal the processor when a particular length of time has passed. One such item is the High Precision Event Timer (HPET), and back in the history of ...
Mokubai's user avatar
  • 93.1k
6 votes

Task scheduler - What is "Wait for idle for"?

And just to complicate this a little more, Windows only evaluates if the computer is idle every 15 minutes. So even if you schedule a task at 09:00, with an idle for 1 minute and you make sure you're ...
Anthony Yates's user avatar
6 votes

Powershell finally block not executed in windows task scheduler

As alluded to in the comments by Lieven Keersmaekers, the finally block doesn't get a chance to run when you use End to interrupt the task. This is because End just kills the process. PowerShell would ...
Ben N's user avatar
  • 41.1k
6 votes

How do I prevent Windows from stopping my task (created in Task Scheduler) when switching to battery power?

I believe this is caused by a setting that is greyed out and yet still active. To resolve, edit the task and proceed as follows: Go to Conditions tab. Check the box "Start the task only if the ...
Rob Pomeroy's user avatar
5 votes

Auto-terminate a Windows application after a given amount of time

I might be late here but you can basically do it by using command prompt Open notepad Copy/paste this code cd "PATH OF THE .EXE FILE" start APP.exe timeout /t 3600 taskkill /im APP.exe /f Save the ...
Damzaky's user avatar
  • 151
5 votes

Windows Task Scheduler: Schedule task to run once every 10 seconds

It's silly windows doesn't have this functionality built into Task Scheduler. However, it can be easily worked around with a simple powershell script. $i = 0 for ($i=0; $i -le 4) Start-Service -...
G_Style's user avatar
  • 149
5 votes

User restriction policy when creating a scheduled task

Check the "Do not store password", worked for me.
SwagOnEm's user avatar
  • 781
5 votes

Running Webcam with multiple applications

I recommend to use the free and open source software, OBS Studio. There is an OBS VirtualCam plugin which enables to create a virtual camera which can be used by other apps, for free, with no odious &...
Sam Watkins's user avatar
5 votes

Task Scheduler repeat task not triggering

I ran into this problem me too, I was able to solve it by setting the start date and time one or two minutes ahead of the time of making the task to trigger the action and start repeating it as ...
IdontCareAboutReputationPoints's user avatar
5 votes

Task Scheduler repeat task not triggering

The correct way to set this up is to set the start time any time in the past, then select "Run task as soon as possible after a scheduled start is missed" in the Settings tab.
user917170's user avatar
5 votes

Task Scheduler repeat task not triggering

I fought with this non-sense for an entire day, scouring event logs and triple-checking permissions, and the only logical conclusion is that Task Scheduler shows the Next Run Time incorrectly when you ...
alex_223's user avatar
  • 106
5 votes

Windows 10 scheduled tasks are not running

I have same issue here. And found one workaround which may help someone to solve this. If I set start date and time to be in future (near future, just 1 minute), task will be triggered and will repeat ...
MiTja's user avatar
  • 51
5 votes

How to create a persistent cronjob on an Ubiquiti Edgerouter-X so its still there after a firmware update

Your solution seemed perfectly fine to me (running on a EdgeRouter X v2.0.9-hotfix.1). I believe you just had some problem with relative paths or permissions when writing your result.txt file. I did ...
F.D.Castel's user avatar
5 votes

Win 10 Task Scheduler with Microsoft Account

For username, following example by Thomas, the format is pcname\username, you can check your username by running whoami at command prompt: C:\Users\Thomas>whoami MyPC\Thomas If you use a valid ...
badrul's user avatar
  • 76
4 votes

Why can't a Task Scheduler job access a mapped network drive?

I overcame the problem by changing the option "Run Whether user is logged on or not" to "Run only when user is logged on". Try this it may help you.
user731960's user avatar
4 votes

Why can't Excel open a file when run from task scheduler?

When setting DCOM permissions, if Microsoft Excel doesn't appear in dcomcnfg try mmc comexp.msc /32 reference
cmo's user avatar
  • 59
4 votes

Windows 7 Task Scheduler is giving me an error saying "The specified account name is not valid"?

I know this is old, but none of the solutions above worked for me. I ended up discovering that you have to enter the user name as ComputerName\Username in the text box (along with the password, of ...
ahelton's user avatar
  • 73
4 votes

Why doesn't Windows 10 task scheduler require administrative permissions to configure a task to run elevated?

Enabling the Run with highest privileges option does not guarantee a task will be run with elevated permissions. For a task to actually run with elevated permissions, the user account configured to ...
I say Reinstate Monica's user avatar
4 votes

Redirecting process output in Task Spooler

With a little bit of digging, this Google Groups Post notes a simple solution: tsp bash -c "command -with arguments > logfile"
Jan's user avatar
  • 173

Only top scored, non community-wiki answers of a minimum length are eligible