All Questions
Tagged with windows scheduled-tasks
356
questions
1
vote
1
answer
24
views
Batch script does not output file when limited user runs it from an administrator task manually
The Problem:
I want to let a limited user restart a Service. This requires admin privileges, and thus the limited user is unable to restart individual services. I also want to create a timestamp file ...
0
votes
0
answers
15
views
Task Scheduler Running Multiple Instances
I am encountering an issue with Task Scheduler on a Windows Server. I have a startup task that runs a program/script via Git Bash, which points to a .sh file that executes a Python script every minute....
0
votes
1
answer
21
views
How to schedule a task that runs once every day only if the user has logged in
When an user logs in to his pc, we need to perform a certain task, but this task should only be done once a day.
So if the user logs in/out several times a day, only the first time the task should ...
2
votes
0
answers
22
views
Task Scheduler Windows 11 not waking the computer
I know that variations of this have been asked previously and I have read most of the responses to older threads. However I am using a newer OS and those older threads have helped me get this far but ...
0
votes
1
answer
46
views
Run script elevated as different user on remote machine
I have a Windows Scheduled Task that runs a Powershell script file A.ps1. This task runs mostly locally and does NOT need elevation/administrator access. However, a few steps need to run on a remote ...
0
votes
1
answer
38
views
How does Windows Task Schedule run tasks with multiple actions?
If you have a Windows Tasks Schedule Task with multiple actions, how does it run them?
Does it kick off each additional action without waiting for the previous action to finish, or does it wait until ...
0
votes
0
answers
123
views
Windows Security Event ID 4800 (lock screen) on Win 11 Pro for Workstations
I have a task that is triggered on PC1 whenever the user locks their computer. This works fine.
I just set it up the same on PC2, but the Event ID 4800 is not logged on this machine when the user ...
0
votes
0
answers
15
views
Aside from the Task Scheduler, how can tasks automatically fire on a fresh Windows Server 2019 machine?
I have a Windows Server 2019 machine. It is pretty much an empty box. My company has installed a handful of things on it, but I am convinced that I have checked it all. Mysteriously, the CPU goes wild ...
1
vote
1
answer
134
views
Windows 11 Task Scheduler - How to stop a running powershell script task?
In Task Scheduler, how may I stop a running task sooner than 1 hour, say immediately after execution?
I've tried manually entering '1 minute', but the Task is still 'running'. Suggestions?
I'm running ...
1
vote
1
answer
51
views
No internet connection when scheduled task starts or when Sql server agent job starts
I've a task that runs daily which is failing because it starts without internet connection.
I tried to tick wait for network but it doesn't work either.
I tried to register the task with System and ...
0
votes
1
answer
324
views
Launch request ignored, instance already running
I have created a scheduled task that runs every minute, indefinitely.
The task launches a batch which moves files between 2 servers. It runs with a specific domain account.
The task takes up to 10 ...
1
vote
1
answer
810
views
Batch files run through Task Scheduler aren't working as intended
This is the code I am using. It is something I found on other posts on this site.
Script Code #1:
@ECHO OFF
SET EXEName=TcpSnd.exe
SET EXEFullPath=D:\ComputerRX\Pharmacy\TcpSnd.exe
SET ...
0
votes
0
answers
136
views
How to create a wake-up task on Windows 11?
I need to execute some apps every time the machine wakes up in the mornings.
I tried to create Scheduled Tasks like the one below, but it didn't work. When I wake up the machine nothing happens.
What ...
0
votes
0
answers
17
views
Task scheduler hibernate after 18:00 with task repeat issue
My use case:
Hibernate computer after 18:00 if it's being idle for 10 minutes.
But if I turn it on after hibernation I would like this task to be repeated every 10 minutes till next morning.
My setup
...
1
vote
1
answer
331
views
How to run wsl using Task Scheduler without loging?
According to Task Scheduler- Batch "Run whether user is logged on or not" not working and other articles, "Run whether user is logged on or not" requires pure batch processing ...
0
votes
1
answer
413
views
How to pass arguments from a windows 10 scheduled task to a powershell script onLock and onUnlock events/triggers
I am trying to setup the following scenario using a windows 10 task scheduler.
A logged in user locks or unlocks the workstation
A powershell script gets triggered and the PC-NAME and a USER_NAME of ...
0
votes
1
answer
716
views
Starting a Scheduled Task from Command prompt gives Access Denied
I have a FreeFileSync setup that backups my files. I need non-admin users be able to launch the backup.
I created a scheduled task with the name "FreeFileSync PC Backup" and configured it ...
1
vote
1
answer
2k
views
How to make sure a task is run at Windows startup?
I have trouble running a PowerShell script and/or and .exe file on boot with Windows (both win10 and win11). I have tried multiple methods:
Put the script inside shell:startup
Create a task with Task ...
2
votes
0
answers
39
views
How to run scheduled task only if none of a group of programs are running?
I have been using Task Scheduler to launch and terminate compiled AutoHotKey scripts depending on whether other apps are launched or terminated. I used information on custom event filters from this ...
0
votes
1
answer
80
views
Parameter "262144" (top-most attribute set) in Task Scheduler does not work (VBScript)
Parameter 262144 (top-most attribute set) in Task Scheduler does not work. When creating a task to run a .vbs file, parameter 262144 does not work (does not open the window on top of others), although ...
1
vote
1
answer
263
views
Script detects and runs when USB Drive with unique serial number is connected
Script should run when it detects USB drive with specific serial number is just plugged in.
But its giving this error msg:
{ Cannot convert value "Win32_PhysicalMedia='K:'" to type "...
0
votes
0
answers
242
views
How to automate NirSoft MultiMonitorTool using Windows task scheduler?
I'm using the freeware software MultiMonitorTool to automate the configuration of displays on a Windows 11 computer.
I got two Batch scripts that "do" (disable the physical display) and &...
0
votes
1
answer
3k
views
Configuring a scheduled task to run whether or not a user is logged in Powershell
I'm setting up scheduled tasks in Windows Server 2016 through Powershell (not through schtasks.exe).
$user = "Administrator"
$trigger = New-ScheduledTaskTrigger -Daily -At 0:00
$action = ...
1
vote
1
answer
2k
views
Powershell: Get-StoredCredential not working when script is run from task scheduler
I am writing a powershell script which shall periodically run to backup the contents of a remote folder. That remote folder is mapped as a WebDav share to my Windows drive G:\.
This post and this one ...
1
vote
1
answer
987
views
Programmatically Enable LG Gram Laptop Keyboard Backlight at Startup
I can't find anywhere how to automatically have the backlight turn on at either startup or after sleeping/hibernation after triggering a login event.
Is it possible to turn this on via a registry ...
0
votes
0
answers
1k
views
How to schedule windows task with trigger logoff/shutdown and without elevation or stored credentials?
Important:
Please be aware, I search for a solution does not need either elevated rights (high-user-integrity) nor user credentials to be entered.
So, this is no duplicate.
Background story:
In ...
1
vote
1
answer
916
views
Windows Task Scheduler Run whether user is logged on or not On remote Server
I have a Powershell script I want to schedule. With this script, I want to send out an email.
When scheduling it only when I'm logged on, everything runs fine. The email gets sent out, no issues ...
0
votes
0
answers
254
views
Windows task scheduled powershells script that uses powercfg.exe prevents system from sleeping
Long story short, I have a task scheduled to execute a PS script ever 15 minutes that is checking electricity spot price. When it's higher than I want, it sets
powercfg.exe -x -standby-timeout-ac 60
...
0
votes
0
answers
308
views
Schedule tasks on windows 11: administrator has no permissions
Trying to schedule a task, Enter user account information for running this task.
User account selection drop down:
sa
abc700ge5d28c9a2
<myUserAccount>
Where do the first two user accounts ...
1
vote
0
answers
122
views
Windows Scheduler, process terminate event trigger fail because process started from external drive don't use disk letters
I am searching for posts that tell people how to start a new task when a specific process got terminated, and finally found some old posts such as
"How to start a program when another one is ...
1
vote
0
answers
539
views
Task Scheduler "stop task if it runs longer than" doesn't work
I try to use "stop task if it runs longer than" in Windows 10 Task Scheduler both inside the task trigger and inside the Settings tab, but it actually doesn't stop the program in the time ...
0
votes
1
answer
1k
views
Windows 11 using Task Scheduler to change the Windows light/dark theme EXACTLY like how Settings would do it
Since Windows 11 doesn't have the light/dark theme depending on time of day, I decided to implement one through Task Scheduler. Basically at certain times, I'd change the binary values of
Computer\...
1
vote
2
answers
368
views
How to disable FireFox extensions through Windows Task Scheduler
I've set Task Scheduler to toggle various tasks depending on the time of day, such as setting Windows to dark mode at night and light mode at day. In keeping with this setup, I'd like to automatically ...
0
votes
0
answers
560
views
Windows task scheduler doesn't start task when the battery is low
I create the task with SCHTASKS.EXE /create /tn "TaskName" /ru system /xml ".\TaskName.xml"
This is the content of TaskName.xml
<?xml version="1.0" encoding="UTF-...
2
votes
1
answer
12k
views
Reboot the server at a given date and time
I need to schedule a reboot of a server every other Saturday at 11 PM.
I need to get this automated and not have to run it manually.
I have tried SCHTasks but the client does not accept and needs a ...
0
votes
0
answers
653
views
How to prevent Windows from shutting down if a scheduled task is running?
I have a task scheduled through Task Scheduler that can take a while to complete. I would like it to prevent Windows from shutting down (triggering the typical "waiting for program to close" ...
0
votes
1
answer
533
views
How to access WSL files from Windows 11 task scheduler script
In .BAT file running from Task Scheduler task as administator user
eriting to file Windows Subsystem for Linux drive using
echo test >\\wsl.localhost\Debian\var\lib\postgresql\12\test
throws error
...
0
votes
1
answer
411
views
How do I prevent this dialog from popping up when running a VB script from task scheduler?
This is the undesired dialog that pops up when I run a Task in the Task Scheduler that just calls a VB script. Any idea how to make my Windows understand, that I do want to run the .vbs file using the ...
1
vote
1
answer
1k
views
Cannot run .exe from Task Scheduler same as in PowerShell window
I am trying to run an .exe from within a PowerShell (PS) script that is started from Task Scheduler (TS). The .exe does not execute, although it is listed in Get-Process.
If I run the script manually ...
0
votes
1
answer
782
views
Task Scheduler wait until first logon of the day but thereafter guarantee only run at 1 hour intervals
I am trying to create a task in task scheduler to run every hour and pop up a dialogue that lets the user pick from a list what activity they are currently working on. These tasks need to be spaced ...
1
vote
2
answers
4k
views
PowerShell inspect Task Scheduler job history and report issues
I am trying to write a PowerShell script to look at a server's task scheduler logs for a specific task. I want to know if there are any errors or anything out of the ordinary.
Typically I see event ...
0
votes
1
answer
880
views
How to enable/disable windows defender on schedule
I want to enable/disable Windows Defender via Task Scheduler. The reason I want this is because I'm running an automatic backup via Backup and Restore (Windows 7) option and it keeps failing because ...
0
votes
0
answers
34
views
How to change the number of devices in a endurance test file while scheduling with windows explorer?
I have a bat file that takes 'number of devices' as an argument, runs a performance test and puts the results in a 'results' folder. I am trying to automate running the bat file every hour, which can ...
3
votes
2
answers
6k
views
How to daisy chain tasks in the Windows Task Scheduler to run consecutively?
When one scheduled task is completed, I want another task to start immediately after. Task #1 already has 32 actions, so I cannot add another action. So I figured "Oh, I'll just split my single ...
0
votes
1
answer
972
views
Running as an admin, is it possible to create a non-administrative scheduled task?
I'm working on a project responsible for establishing three callbacks for the execution of commands. These are supposed to represent three different scenarios: Regular Command Prompt, Administrative ...
1
vote
0
answers
305
views
Windows task scheduler: when using the "repeat task every" option, I can't prevent the scheduler to trigger script execution when resuming from sleep
Using Windows task scheduler, I want to trigger script execution each hours (for instance at 20h15, 21h15, 22h15 etc...) when the computer is awake but NOT when it is in sleep/hibernate mode. When the ...
1
vote
0
answers
355
views
how do I send an HTTP request when my pc goes to sleep or shutsdown
I am trying to set up a system where when my pc goes to sleep or shutsdown it sends an HTTP request to a raspberry pi on my local network which then performs some actions. Currently I have written a ...
0
votes
0
answers
546
views
Automatically Open a File when A certain directory is opened in Windows Explorer
Is it possible to open a certain text file or a file with specific extension, when I open a particular directory in Windows Explorer in Windows 10?
Here is one possible scenario for this request:
I ...
3
votes
2
answers
2k
views
Windows task scheduler not calling the script when trigger is true
I have scheduled the in-built windows task scheduler to run python code every day, the trigger time is 11.14 AM. The thing is, I told the scheduler to run cmd and invoke the keywords python pathtofile....
0
votes
1
answer
2k
views
Win 10 - Task scheduler not running when specifying a domain account as local admin
I have a gpo that adds a domain account to be a member of the local administrator group on a domain joined pc. I can see the user is part of that group, and have the task scheduler set to run whether ...