Task Scheduler not Working


  1. Posts : 40
    W10 Home
       #1

    Task Scheduler not Working


    Hi - I have been using Task Scheduler for years running automated tasks. Suddenly, it doesn't run a task I have scheduled in the middle of the night. Nothing changed other than it stopped working. Has there been an update or something I am missing?

    Thanks,

    W10 version 22H2
      My Computer


  2. Posts : 4,188
    Windows 11 Pro, 22H2
       #2

    Could you be a little bit more specific? Perhaps, step us through the process that you use to create a sample task from start to finish so that we can try to either reproduce the issue or so that we might see if there is any potential issue in your workflow.

    For now, the only thing that I can say is "Task Scheduler works fine for me" but I'm sure that you would agree that this is not particularly helpful to you
    Last edited by hsehestedt; 29 Dec 2023 at 04:45.
      My Computers


  3. Posts : 43,022
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #3

    Does the task run if you run it manually from the task scheduler?
      My Computers


  4. Posts : 295
    Windows 10 Pro
       #4

    I have had NOTHING but issues with Task Scheduler in Winblows 10. And like you I have used it with great success in the past with Windows XP and Windows 7. So, I now use a couple different ways of conducting task related functions. And they are as follows:

    1) WhatInStartup WhatInStartup - Disable/delete programs at Windows startup

    2) System Scheduler System Scheduler - schedule applications and reminders

    Splinterware - Scheduler

    WhatInStartup is nice to show what programs and whatnot are starting, but Autoruns does that job a lot better. However, Autoruns doesn't allow you to add a startup item. So that's where WhatInStartup shines. What I do is create a batch file to launch a program or whatever and have WhatInStartup launch it on Windows start.

    Code:
    start "" "C:\Program Files\some_program\some_program\widget.exe"



    If the program requires Admin rights, then add all this crap to the top of the command:

    Code:
    @echo off
    
    :: BatchGotAdmin
    :-------------------------------------
    REM  --> Check for permissions
        IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
    ) ELSE (
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    )
    
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
        echo Requesting administrative privileges...
        goto UACPrompt
    ) else ( goto gotAdmin )
    
    :UACPrompt
        echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
        set params= %*
        echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
    
        "%temp%\getadmin.vbs"
        del "%temp%\getadmin.vbs"
        exit /B
    
    :gotAdmin
        pushd "%CD%"
        CD /D "%~dp0"
    :--------------------------------------
    So for example, flushing the DNS cache.

    Code:
    @echo off
    
    :: BatchGotAdmin
    :-------------------------------------
    REM  --> Check for permissions
        IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
    ) ELSE (
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    )
    
    REM --> If error flag set, we do not have admin.
    if '%errorlevel%' NEQ '0' (
        echo Requesting administrative privileges...
        goto UACPrompt
    ) else ( goto gotAdmin )
    
    :UACPrompt
        echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
        set params= %*
        echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"
    
        "%temp%\getadmin.vbs"
        del "%temp%\getadmin.vbs"
        exit /B
    
    :gotAdmin
        pushd "%CD%"
        CD /D "%~dp0"
    :-------------------------------------- 
    ipconfig /flushdns


    Now with System Scheduler you can have things fire off on a schedule. In my case I have a couple police scanners connected to a laptop sitting here recording audio 24/7. I have System Scheduler fire off a backup via the FreeFileSync program for that audio once every hour to an external USB drive. I even save the audio to the cloud with the program S3 Browser which is for Amazon AWS S3. You could use a NAS and Syncthing too I guess...

    So there you have it. I could never rely on Windows built-in programs to do things correctly. It's why I absolutely refuse to use things like RDP and instead use TightVNC over a reverse VPN with ZeroTier or whatever. RDP is hacker plagued and the ever popular TeamViwer is also hacker plauged. If anyone uses TeamViewer it's strongly advised to 2FA the account. And for that there's the Aegis App, Bitwarden or the KeepassOTP plug-in for Keepass...
      My Computer


  5. Posts : 40
    W10 Home
    Thread Starter
       #5

    Thanks everyone, problem solved. It was user error. I'll be more specific next time. Than you again for your responses.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:15.
Find Us




Windows 10 Forums