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
1 answer

Task Scheduler custom trigger - start when EventID is FOO and EventData.Data is BAR

I want to Windows Task Scheduler to start a custom task when a special event is logged to Windows Event Log. The event has EventID 6702 and when a data parameter is MyBackupJob. Here is my current custom trigger and it does not work:  …
bahrep
  • 29,961
  • 12
  • 103
  • 150
1
vote
1 answer

Permission denied for geckodriver.log only from Task Scheduler

My script using Selenium and Firefox for a postal tracking service website gets the status of my item. Whenever there is an update I have it send me an email. It works fine from a batch file and on its own, but running it from Windows Task Scheduler…
1
vote
0 answers

Excel doesn't load COM Add-in at scheduled excel task

The case: I use task scheduler that opens excel and a macro is being executed on Workbook_Open. The macro uses a COM Add-in. The problem: When started from the Task scheduler I get an error that the addin dll is not found and the add-in is missing…
hammer4
  • 11
  • 5
1
vote
2 answers

Remove a task folder using schtasks.exe

In my program, after installing, I'm adding a task to the task scheduler using the following command : schtasks.exe /create /xml "task.xml" /tn "MyTasks/Task1" /f In order to properly uninstall the program, I want to be able to remove totally the…
TmZn
  • 399
  • 5
  • 16
1
vote
4 answers

Redirect C# process output

I am working on a project that will query scheduled tasks running on other systems. I have written a console application that runs schtasks and redirects the output to a text file. However, I was wondering if it is possible to redirect this output…
Matt
  • 1,220
  • 3
  • 21
  • 36
1
vote
1 answer

Run an exe every 5 minutes with powershell scheduledtask

I am trying to schedule a task to execute every 5 minutes using powershell. The code below works but terminates after some time. Any ideas what might be causing that? Is it the code or should i look elsewhere? Thanks, Alex $Ale =…
Alex
  • 23
  • 1
  • 6
1
vote
0 answers

Creating backup folder through Task Scheduler and a Python script gives Date Modified as the date of the task

Trying to run a script with Windows Task Scheduler to copy a folder to a different location on a schedule. The script works, for ref: import os import shutil import datetime src = r'J:\SteamLibrary\steamapps\common\ARK\ShooterGame\Saved' dest =…
ancilla
  • 39
  • 5
1
vote
1 answer

Run script on Task Scheduler windows where an excel file is created

I need help with that problem. Searching on Google, I've found a way to run the R script without error. It's creating a .bat file with the directorys of Rscript.exe and the script I want to run: My script is very simple: create a dataframe and save…
Franky1010
  • 11
  • 2
1
vote
1 answer

Why is this task not running every minute in Windows 10?

I have a Laravel project running via XAMPP on my local Windows 10 machine, and I want to set up the Laravel task scheduler (https://laravel.com/docs/5.8/scheduling) to run so that I can test out cron jobs locally. I followed the following…
HartleySan
  • 7,404
  • 14
  • 66
  • 119
1
vote
2 answers

Create a batch script to use sendemail.exe in Task Scheduler

I'm trying to create a little batch script to run via task scheduler but running into an issue with the multiple PDF files in the same directory. My aim is: map the remote NAS (this is to take load off the server, and as a backup) move the existing…
markb
  • 1,100
  • 1
  • 15
  • 40
1
vote
1 answer

Redirecting schtasks output in C# Windows Form

I have an issue that I can not figure out. I have a Windows form with a Text Box, Button, and List Box. I want to type an IP into the text box, push the button, and redirect the schtasks output to my list box. However, I never get anything more…
Matt
  • 1,220
  • 3
  • 21
  • 36
1
vote
0 answers

Python code could not run in task scheduler

I wrote a python code to download email attachments and this code works fine when I start it manually (just double click/open with python). However, when I tried setting up a task in task scheduler, the job keeps running forever and no output is…
1
vote
1 answer

SchTask with XCOPY command

I am creating an installation script for our web panel software, but I don't do too many batch scripts. I need to keep this all in the same file (can't seperate it out) so how exactly can I do this? SchTasks /Create /SC DAILY /TN "%ip%%port%-PB" /TR…
user470760
1
vote
1 answer

Schtasks CMD .bat trouble

When i run the task it starts the .exe fine but the event ID isn't triggering the .exe automatically. @echo off @SCHTASKS /Create /TN Security_Microsoft-Windows-Security-Auditing_4624 /TR "C:\Program Files (x86)\example.exe" /SC ONEVENT /EC Security…
FATCAT47
  • 40
  • 10
1
vote
1 answer

Task Scheduler script to open Excel works but does not load a specific add-in

below is a summary of my issue, any guidance you can provide would be greatly appreciated. Objective: Use the task scheduler to open Excel and execute a macro that sends a PDF of the Excel sheet via Outlook. Issue: The Excel file relies on a COM…