Solved Losing scheduled tasks submitted and functional.


LogicWilly

Member
Local time
9:14 PM
Posts
8
Visit site
OS
Windows 11
I am submitting tasks to the task scheduler from an application I built in VB6 and they work, triggering at the correct time launching another application passing arguments. The tasks are submitted specifying trigger time and end boundary (expiration) time. Each task given a unique name. The tasks remain posted in the scheduler for an hour or more, but within a few hours they disappear before the trigger time. I have researched this and found no explanation for this behavior. Anyone else experiencing this?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox
Can you confirm your scheduled task shows up in C:\Windows\System32\Tasks?
VB6 is very old and doesn't work well with UAC
 

My Computer

System One

  • OS
    Windows 11
You may also want to enable the TaskScheduler log with the following from an elevated powershell prompt.
Powershell:
$logName = 'Microsoft-Windows-TaskScheduler/Operational'
$log = Get-WinEvent -ListLog $logName
$log.IsEnabled = $true
$log.SaveChanges()

Then schedule some tasks and look at
EventViewer >
'Applications and Services Logs'
Microsoft
Windows
TaskScheduler/Operational
 

My Computer

System One

  • OS
    Windows 11
Thank you neemobeer for your reply. I did look at the task scheduler (taskschd.msc) ad the task appears to be correctly registered. If the task remains registered long enough for the trigger time to occur, it does launch the application program correctly.

Last night sometime after posting this thread, I submitted a new task. This morning the task submitted last night was still registered. As such, the disappearance seems to be sporadic.

I will implement the logging and view the event log as you suggested. Hopefully that will produce some clues.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox
I have re-checked my code and find there was no cleanup process being run to remove the tasks. (The target application does the cleanup, but only for the task that was triggered and none of the lost tasks had launched the target application) Since responding to your previous suggestions, I registered 9 tasks and to my surprise they are still there five hours later. Each of these tasks are to be triggered by a specific date and time over the next 8 months with a specified expiration 60 minutes past the trigger time. In addition to setting up the scheduler logging, I have added logging to the target application.
I thank you for your effort in responding to this thread and value your suggestions. Perhaps this was just a one time flaky behavior.
I will research this "does not work well with UAC" concern. If that is a problem then as this application is for my own use I could disable UAC/LUA.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox
neemobeer - I presume you mean the log file you gave me instructions to implement. If so, yes, I have looked at it. I have viewed the events log as well. I am not currently having this problem, so I would not expect to see anything of value in the logs concerning these tasks. The nine tasks are still registered in the task scheduler (yes, I did a Refresh before looking).
Since this problem has not happened for about seven hours, I would set this thread aside.
Thanks again for your responding.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox
I am no longer having this problem. Eight tasks scheduled yesterday morning are still registered this morning. Not sure why I had this problem - hate to look like the boy that cried wolf. Thanks for the support on this issue. I am marking this as resolved.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox
Ach! Not yet resolved.
The problem has again occurred. I looked at the event viewer log neemobeer suggested I create and I see the action stating the user (me) first disabled one of the tasks and then deleted that task for all eight of the tasks that wee previously registered. Now I need to determine what in the system is actually doing this as none of my task scheduling apps were running. I will post more info s it becomed discovered.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox
I would setup procmon to watch C:\Windows\System32\tasks that is where the scheduled tasks exist as xml files. Procmon should give you the source process
 

My Computer

System One

  • OS
    Windows 11
Ah! That sounds like what I was wanting to pursue. Never used procmon before, nut I have downloaded it along with the internals document and will proceed from there. Thanks for the suggestion.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox
Oh no! I am so embarrassed. In my code I had implemented a small loop that should have been executed only during debugging - the loop kills all the tasks the database has registered as being created so that during the debug operation the slate would be clean.
I learned two things: 1) do not hastily assume the code is clean and 2) there is a tool (procmon) along with internals documentation I previously was not aware of.
Thanks to neemobeer for the assistance.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    HP EliteBook 860 G9
    CPU
    intel i7
    Motherboard
    ?
    Memory
    1 Gigabyte
    Graphics Card(s)
    ?
    Sound Card
    ?
    Screen Resolution
    1980x1080
    Hard Drives
    Main drive is SSD 1 Terabyte
    Cooling
    ambient
    Keyboard
    IOGEAR wireless
    Mouse
    IOGEAR wireless
    Internet Speed
    2mips
    Browser
    Firefox

Latest Support Threads

Back
Top Bottom