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
4
votes
3 answers

PowerShell add Task to run PowerShell script with parameters

I am trying add a Task to the Task Scheduler from a PowerShell script that will run a PowerShell script with parameters. The spaces in the file path are conflicting with the necessary quotes surrounding the whole command, and SCHTASKS converts ' to…
Brent
  • 1,378
  • 2
  • 16
  • 30
4
votes
3 answers

Downloading an XML file via FTP

I have a list of feeds in a database that I use to download a XML file from a FTP server and then parse it. The scrpt is bundled up into a jar file which is run daily using Windows Task Scheduler. Occasionally the request get haulted at grabbing a…
locrizak
  • 12,192
  • 12
  • 60
  • 80
3
votes
1 answer

Task Scheduler failed to start - Launch Failure

I have created one script and its stored on my local. I want to schedule this python script on a daily basis. I was trying using Task Scheduler but somehow its not working when we select "Run whether user is logged on or not". Please note its…
3
votes
1 answer

How do I get all the information available from schtasks.exe via PowerShell Cmdlets?

When I use the PowerShell Cmdlet Get-ScheduledTaskInfo on a Windows server I get the following pieces of data LastRunTime : 22/04/1932 11:30:30 LastTaskResult : 267011 NextRunTime : NumberOfMissedRuns : 0 TaskName :…
gerard
  • 835
  • 11
  • 27
3
votes
1 answer

Schedule task to run hidden in Inno Setup

I have an exe file that I've created using pyinstaller. I am using Inno Setup to create a Windows installer for this executable. Here's a snippet from my compiler script : Filename: "schtasks"; \ Parameters: "/Create /F /SC MINUTE /MO 2 /TN…
jaimish11
  • 536
  • 4
  • 15
3
votes
4 answers

How to change the priority of a running java process?

In a related question we explored using ProcessBuilder to start external processes in low priority using OS-dependant commands. I also discovered that if a parent process is low priority, then all of its spawned processes start in low priority. So…
Andrew
  • 617
  • 2
  • 6
  • 19
3
votes
2 answers

How to setup a Powershell Script in Windows Task Scheduler with admin permissions?

I am running the following PowerShell script that creates a Tableau backup and uploads it to Google Cloud Storage using the Windows Task Scheduler. #Tableau Server backup &$tsm maintenance backup -f $Backups_file -d -u $User -p $Password CD…
Diego Serrano
  • 846
  • 2
  • 15
  • 34
3
votes
1 answer

how to set trigger "on connection to user session" in task scheduler from powershell?

I want to schedule a task in task scheduler from Powershell. I want to set 2 trigger "On connection to user session" with local and remote both. And also,I want to uncheck some settings and conditions in case if they are marked in task…
3
votes
2 answers

How do I run a python script in task scheduler in a virtual environment when there is no activate.bat and I'm mortal

I can't say I'm optimistic. I've looked at this: How to schedule a python script to run from virtual environment via task scheduler and…
3
votes
1 answer

windows 2008 task scheduler return code 1, no logging

trying to run a simple batch file in windows 2008 task scheduler call cleanup.bat > cleanup.log; call ant -f ongoing_changes.xml > automation.log The action is triggered properly and from the History logs (7 information messages) this seems to be…
Tiberiu
  • 2,870
  • 3
  • 20
  • 17
3
votes
0 answers

Windows Task Scheduler runs task one day before the schedule

We have several .bat files being executed via Windows Task Scheduler each Saturday at the specific time. For example, one .bat file is executed at 1AM each Saturday via Task Scheduler, second .bat file is executed each Saturday at 2AM etc. However,…
3
votes
4 answers

How do I debug an exe running through Windows Scheduler?

I'm using Windows Scheduler to run an exe I have written. How can I jump into a debug session when the scheduler starts my exe? Update 1. I had thought of doing a Thread.Sleep and then Attach to Process. When I tried it, it says Debugger is already…
Paul Rowland
  • 8,244
  • 12
  • 55
  • 76
3
votes
1 answer

Python script with Win32Com not running in task scheduler

Background: I am on Windows 7 and am trying to automate some email-related list updates. I have a python script that pulls-in emails, downloads certain attachments and sends me back a new email with some results. This all works great when I run the…
Paco
  • 443
  • 3
  • 10
3
votes
3 answers

TaskScheduler: "Access is Denied" (0x80070005) when running scheduled tasks on Windows Server 2019

I just set up a new Windows Server 2019 instance, and am trying to run tasks (C# console apps) through Windows Task Scheduler. I've set it up to log in as a certain windows user, which has "Administrators" permission. However, when I try to run the…
3
votes
4 answers

How to add Author to a windows task using powershell

I'm creating a window task using powershell, everthing is ok, but i can't find how to add the Author name. Register-ScheduledTask as a parameter for description but not for Author. Exported Windows task