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

Pyautogui doesn't work in windows task scheduler

I wrote a script to handle the mouse and keyboard to help me deal with the works in windows by using the library "Pyautogui". it went well if it was in a logging active session, but it doesn't work if the windows went to lock screen. I can't disable…
Tilei Liu
  • 155
  • 1
  • 6
2
votes
1 answer

Run Windows Task without cmd pop-up

I have a task launched by the task scheduler (python script). I don't want the cmd window appear (python.exe). I can't use SYSTEM user account or "Run whether user is logged on or not", is there any way to hide the cmd pop up ? I can't use SYSTEM…
user9946692
2
votes
1 answer

Using Airflow to Run .bat file or PowerShell program located in remote Windows Box

Currently some of the jobs are running in different Windows VM's. for eg., Task Scheduler to run Powershell files .bat files python files. Sql Agent jobs To run SSIS packages We are planning to use Airflow to trigger all these jobs to have…
2
votes
2 answers

run copy file script in python 27 get path error errno22 in Windows Task Scheduler

When I run a script in Windows Task Scheduler, I got [Errno 22] invalid mode ('wb') or…
VinceYang
  • 21
  • 3
2
votes
0 answers

Multiprocessing in Python Script Executed by Windows Task Scheduler

I've got a Python script that uses multiprocessing that I need Windows Task Scheduler execute at 6:45 am daily. The reason it is using multiprocessing is so that if the script stalls and has not completed after an hour, the process is…
2
votes
0 answers

Remote Desktop Breaks my Automated Excel Printing Macro

I need to run automatically an excel macro that PDFs a monthly report and then saves and closes the excel file. My proposed solution is that using Windows Task Scheduler it runs a windows batch print file that runs a VBScript which then runs the…
2
votes
0 answers

Setup Bootstrap for Visual Basic Setup Toolkit - EXE - silent installation (VB6)

We have an old application which uses has it's executable (EXE) build on VB6 (Setup Bootstrap for Visual Basic Setup Toolkit ). We are trying to silently install the setup by and running it in a scheduled manner using task scheduler. Command use :…
2
votes
3 answers

How to make schtasks work after the user's password has changed?

On Windows machines, schtasks is a utility similar to cron for scheduling jobs to run on a regular basis. Problem is, when you define a schtask, you must specify the userid and password of the account to run the job. Then later, when the user…
robmandu
  • 193
  • 1
  • 2
  • 11
2
votes
0 answers

Is there way to determine whether a Windows Task Scheduler scheduled task is supposed to run today using Powershell?

I have a bunch of scheduled tasks set up in Windows Task Scheduler and I am trying to use Powershell to read the task metadata and determine whether the task has a trigger that will execute (or already has executed) on the current day. I'm using…
gccree
  • 63
  • 2
  • 7
2
votes
1 answer

Python Script runs in PyCharm but Fails in Task Scheduler (Turbodbc)

I have a large python script that runs just fine in PyCharm and CMD window but it keeps getting hung up and failing at the same point when I automate it through task scheduler. I have narrowed down the point in the code that it is having issues with…
2
votes
3 answers

Is process priority inherited?

Imagine that you have a Windows process A running with priority AboveNormal that starts another process B without specify the priority. Is the priority of the process B inherited from the priority of the process A? So, what will be the priority on…
David Espart
  • 11,520
  • 7
  • 36
  • 50
2
votes
0 answers

Python how to import custom function to another script (problem in Task Scheduler)

I have to import custom functions from script A to script B and execute them in script B. Now it looks like this: Script_B.py import os import sys from A import function_aa from A import function_ab from A import function_ac def main(): …
Anna
  • 914
  • 9
  • 25
2
votes
0 answers

How to give an announce message before forcing users to logoff on remote desktop?

I want to give the users an announce before the virtual machine shutdown. Background: 1, 10 users sign on one virtual machine (Windows Virtual Desktop: Windows 10) 2, The virtual machine will shut down at 10:00 pm, and I want to give users an…
2
votes
1 answer

Python scripts involving selenium behaving differently when called from task scheduler, but working as intended when run from spyder or command line

I have created a python program which uses selenium and chromedriver. I cannot successfully run this script (or any others using selenium) from the TaskScheduler in any way. However, it runs perfectly fine and does all tasks I need when I run it…
2
votes
1 answer

TaskScheduler is blocking the sending of emails through R (RDCOMClient package)

I have a script that is scheduled to run multiple times on a daily basis and is automated through TaskScheduler. Inside this script is a chunk of code to send an email when the process is completed. When I run the script manually (without using…