Questions tagged [windows-task-scheduler]

Use for questions about programmatic modification of task scheduling on any version of the Windows OS.

The MS Windows system scheduler component manages the execution time (time slices) that competing processes & threads are given on available processor cores.

Tag usage

The task is for questions about programmatic modification of task scheduling on any version of the Windows OS. You should also tag questions with their specific Windows version, where relevant.

Related tags

References

Microsoft documentation is the primary source for documentation about Windows Scheduling. You may refer the following topics for more information:

845 questions
2
votes
1 answer

dotnet console app, using generic host, HostedService, Windows Task Scheduler stays in running state

Trying to figure out why my console app won't stop running. Using the following approach in a dotnet core application main method: await new HostBuilder(). ... .ConfigureServices((hostContext, services) => { …
2
votes
1 answer

Task scheduler console application shows just in time debugger on exception preventing program to run again

I have a console application that runs every 5 minutes in Windows Task Scheduler. The program doesn't run again if the program is still running after 5 minutes, so only one instance at a time. However, when an exception occurs, the just in time…
2
votes
2 answers

0x1 error on Python script execution from Task Scheduler

I am trying to run script (script1.py) from windows task scheduler. The script is supposed to control Chrome webdriver and I believe it could be the root of the problem. Result is 0x1. Before creating the task I tested the execution of script1.py…
2
votes
1 answer

Windows Task Scheduler - See line breaks in task description

I know this is a silly question, but it's really bothering me. I'm using Windows Task Scheduler for a process, what I do is create several task from a PowerShell, in each task's description I write some information, like an ID, a code..., and each…
Kevin Chacón
  • 175
  • 12
2
votes
3 answers

Windows 10 Schtasks.exe Delete After Final Run Error

I am attempting to use schtasks to run a once off task that will simply execute a program. Here is what it looks like: schtasks /Create /SC ONCE /TN "OpenCalc" /TR "C:\Windows\System32\calc.exe" /ST "11:59" /SD "09/12/2018" This works. It creates a…
2
votes
0 answers

Git Credential Manager for Windows Memory Issue

I have a powershell script that pulls the latest commit of a repository from github and then builds it using either msbuild (for .net) or webpack (for angular). The script itself is run using windows task scheduler, which checks a deployment queue…
Daryl1976
  • 675
  • 2
  • 8
  • 20
2
votes
2 answers

Pyinstaller generated exe doesn't run with Windows Task Scheduler

I generated an exe from Pyinstaller, this works perfectly when I double click it but when I try to run it via Task scheduler it never runs but in the history it shows "The operation completed successfully". To be sure if it ran, I'm logging some…
Anuj
  • 149
  • 2
  • 11
2
votes
0 answers

Running R Scripts With Windows Task Scheduler

I am attempting to run a saved R script using Windows Task Scheduler. When I run it it fails. In an attempt to troubleshoot the problem I created a small test R script test <- function(){ print("test") } test() I then create a small bat file…
2
votes
2 answers

How to escape double quotes on schtasks passwords

I'm trying to create a scheduled task through schtasks comand and I'm struggling on how to escape double quotes (and other possible special characters) for the password on /RP parameter. SCHTASKS /create /tn "Task name" /tr "powershell…
2
votes
0 answers

How can I force run script before a user lock screen?

I ve created task on windows 7 and I tried it also on windows server 2012 R2. neither of them work. I want to create task to run script when a user lock off( Windows + L ) The script is running fine, but what I want is it runs after lock operation.I…
CompEng
  • 7,161
  • 16
  • 68
  • 122
2
votes
0 answers

schtasks "configure for (operating system)" option

I would like to know if there is a way to set option "Configure for (Operating system)" when creating scheduled task using command line? So far I could not find any command for making this selection.
2
votes
1 answer

aws sync s3 Windows Scheduled Task Returning 0x1

I have created a windows scheduled task to run an aws command to sync a local folder to an S3 bucket. The task runs a .bat file. If the .bat is ran manually, it runs fine. When it is run via the task I get a 0x1 as the last run result. Following…
2
votes
1 answer

Running a batch file which schedules a Task with Wix on Uninstall

I have the following XML in my .wxs file for running a batch file on uninstall: Installed AND NOT…
2
votes
1 answer

Why "schtasks" does not run my job?

I scheduled a task on Windows-XP using schtasks utility, but the task does not run. Here is what I see in the SchedLgU.Txt log file: "MySQL Automatic Backup.job" (WampServer) 10/2/2010 6:36:43 PM ** ERROR ** Unable to start task. The specific error…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
2
votes
2 answers

schtasks with Powershell and script with space in argument

I want to schedule a Powershell script with an argument that has a space in it with schtasks.exe. (Powershell Version 2, Windows 7). Bearing in mind what I’ve read in this forum I’ve come up with this expression to be entered in the Powershell…
user3210625
  • 163
  • 3
  • 13