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
1
vote
0 answers

Scheduled task not running on boot

I have multiple drives, of which one is an NVME SSD and another is an HDD (WD RED). The HDD acts as a archive. I've set all my downloads to initially go to the NVME SSD and then I have a simple PS script that moves them to the HDD. I've scheduled…
1
vote
1 answer

Script to turn off PC if user is inactive for a certain time period in PowerShell

Auto Shutdown if user is inactive. I am trying to create a one time powershell script to shut down the pc if the user is inactive for a period of time. I have done some looking around but the only answer to my problem was using VB. The task…
1
vote
0 answers

After Ending Task Scheduler Task Python.exe does not close

I have a task scheduler task which calls a bat file. I run the task using task scheduler and everything works smoothly, no error etc. But when it comes to ending the task "python.exe" keeps running in the background. My bat file is just a single…
Jengador
  • 11
  • 4
1
vote
1 answer

How to create a task on windows using powershell and specified trigger

I'm trying to create a task on windows taskscreduler using the powershell but without success. The script I need to create based GUI description: "At 08:00 every day -After triggered, repeat every 02:00:00 for a duration of 12 hours" I already found…
1
vote
1 answer

Updating WSL with Task Scheduler

I've been attempting to update all packages in a WSL distro by scheduling an event in Windows Task Scheduler. I'm complicating things a little by having the task also change the message of the day (motd) to display when the last updates happened. I…
1
vote
2 answers

Failure to run WSL internal command from powershell

I need to run WSL internal command from powershell script triggered by task scheduler on user logon. OS: Windows 11 22H2. # waiting for wsl.exe to appear # before adding this I was getting errors about no command wsl # probably something about how…
1
vote
1 answer

Python script and batch file run fine manually, but not when scheduled

I am using Windows 10 Pro. I have made my example as simple as possible. The code just writes some logs in a log file. This is my python script: C:\Users\myname.mysurname\Downloads\test.py import os import logging def main(): …
ric
  • 153
  • 8
1
vote
2 answers

Chain trigger in Task Scheduler in Windows

I scheduled some tasks in Windows task scheduler. I installed a third party tool called Bmail that added a task that sends email from the task scheduler independently. It can be triggered at a given time. Does any one know how to set this up so that…
ZVenue
  • 4,967
  • 16
  • 61
  • 92
1
vote
1 answer

SFTP upload of files that were created since the last run

I am very new to PowerShell and I am in the process of writing a script that performs an SFTP file transfer via WinSCP. I will then be creating a Task on Windows Task Scheduler to run this script every 15 minutes indefinitely. Currently I have this…
1
vote
0 answers

How to upload files to Google Drive with Python script through Windows Task Scheduler?

I am looking to automatically upload files (specifically photos) to my google drive account through Windows Task Scheduler. This script below will successfully upload the desired photos when running the script manually; however, when attempting to…
1
vote
1 answer

How to run my PowerShell module cmdlet as SYSTEM?

Created a PowerShell module, it has a function and exposes a cmdlet for that function. the built-in PowerShell 5.1 and pwsh.exe 7.3.1 (Installed using MSI installer) can detect and run the cmdlet without problem. now I need that cmdlet to "run…
1
vote
1 answer

Create Service/Task with an MSI

I want to package programs into an MSI and create Scheduled Tasks (i.e. run on Boot/Startup). I'm trying solutions available on the market such as Advanced Installer and EMCO MSI Packager, but I get the same error in both: Verify that you have…
1
vote
0 answers

How to start click-once application .application file on UNC path with Windows Task Scheduler?

I've found quite a few posts on the net describing a similar or even the same situation but there were almost no replies and none that helped me get this working. The setup is rather simple. I have a .net application that is published to a UNC…
Toby
  • 570
  • 2
  • 8
  • 23
1
vote
1 answer

Task scheduler not run task with cmd prompt running background

I am trying to run a particular program that uses os.system to run cmd commands from Task Scheduler. os.system('"C:\\Program Files\\BlueStacks_nxt\\HD-Player.exe" --instance Nougat32') os.system('cmd /c "adb start-server"') The code works perfectly…
attat
  • 57
  • 9
1
vote
0 answers

Uncheck 'Do not store password. The task will only have access to local resources"

I'm creating Scheduled Job via Powershell but I can't set this options/setting to either create Task without 'Don't store password. The task will only have access to local resources' or change it afterwards. I've written the following code to create…