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

Windows: Run multiple processes in parallel with one batch file and controlling its start/stop with Task Scheduler

I need to run two processes in parallel from a single batch file, which must be controlled from the Task Scheduler in Windows. Following this answer https://stackoverflow.com/a/49051876/3834178 I created this batch file: ( start "task1" cmd /C…
edoedoedo
  • 1,469
  • 2
  • 21
  • 32
1
vote
0 answers

C check if Program is Running (C program is started by task scheduler)

I wrote a simple program that check if a program run (e.g. Notepad). The compiled program should start in the Windows Task-Scheduler. Problem is, when I run my program normal, it works. When I run in Task-Scheduler it works too when I use the…
Umbrecht
  • 35
  • 6
1
vote
0 answers

R script works in RStudio, but not when run via R.exe

What I'm trying to do: I have a long script I wrote in RStudio which links several SQL databases to pull information and ends up putting it all in to a table in one of these databases. I want to make this automated, so I have a computer that is on…
1
vote
4 answers

Port For Windows Task Scheduler

Does anyone know what the port used to run the task scheduler is in Windows? Does the task scheduler have a port? May I know what the port is, or how to look for the port that the server using to run the task scheduler is?
Nur Fe
  • 47
  • 1
  • 6
1
vote
1 answer

0xC0000142 Errors from Tasks in Windows Task Scheduler

I previously had many C++ .exe programs (developed with C++ Builder XE7) running as scheduled tasks in a Windows 2008 R2 Datacenter server. These tasks were being run by the SYSTEM account and I never had any issues with them before. I recently…
1
vote
5 answers

How can I get the script / exe directory with pathlib in python?

I made a script in Python 3.9.2 that uses pathlib (pathlib.Path.cwd()) to get current script's folder (I then made an .exe file using PyInstaller) If i start the script/exe manually no worries, but if I use windows scheduler or i start the script…
Dife
  • 11
  • 1
  • 3
1
vote
1 answer

Running python export that includes a send email trigger through task scheduler not working?

I am having trouble getting task scheduler to send an email via python. The particular python code I am using creates a monthly export, grabbing data from a SQL database, and then sends an email notifying the team where the export is located. For…
1
vote
0 answers

Windows 7 Task Scheduler - not working when in "Run whether user logged in or not" mode

I am trying to use a Windows Task Scheduler task. This is working when I have the following settings: But, when I change it to the following, Then nothing happens. I tried to debug this issue, but I could not find any way to find why this issue…
user1400290
  • 1,682
  • 5
  • 23
  • 43
1
vote
2 answers

How to extract/display any two columns and their values from command output?

I need the TaskName and the Status columns displayed from schtasks command. I tried the following: for /f "tokens=1,3 delims= " %i in ('schtasks') DO echo %i The output is not pretty looking. Current output if I run schtasks…
jenhenry
  • 23
  • 5
1
vote
1 answer

How to get rid of prompt on quitting MS ACCESS

I am running a Sub procedure stored in an ACCESS database using VBScript. The procedure queries the database and exports/saves a CSV file. My problem is that the script successfully opens the database, runs the procedure but then leaves ACCESS open…
1
vote
0 answers

Assign a task to Task Scheduler from XML File using python :ERROR

I have an .XML file containing scheduled Task and I would like to add it to the task scheduler via python to a remote server. Is there any way I can do that? I have tried import os os.system("schtasks.exe /Create /S 'abc.pggs.com' /RU…
1
vote
0 answers

Excel automation through Windows Task Scheduler throwing an error - 80080005 Server execution failed

We have a console application to automate the excel data refresh everyday at a particular time of the day. It is working fine when we switch off the office updates. But when an office update happens, immediately this stops working and throwing this…
1
vote
0 answers

How to run existing task scheduler's task using Python?

I created a task in my Windows 10 Task Scheduler. I was wondering whether it is possible to run the task using Python. I know it is possible to run the task using CMD (How to run existing windows 7 task using command prompt) but can I somehow do it…
Bran
  • 29
  • 1
  • 5
1
vote
1 answer

Creating a web scraping program compatible with Windows task scheduler "run whether user is logged on or not"

I need to be able to web scrape information daily on a website that requires login credentials. I have wrote a program in C# that uses Selenium and Chrome, which works well when run normally, or through the Windows Task Scheduler when selecting "run…
1
vote
0 answers

RSelenium makeFirefoxProfile with Windows Task Scheduler

I am navigating a web page with firefox using RSelenium package. When i start building my script i used makeFirefoxProfile function to create temporary profile for setting download directory and related file type to download needed file into…