Solved Scheduled task remains running, when run manually

swiftie

Old git Member
Member
VIP
Local time
9:00 PM
Messages
149
Location
Hampshire, England
I have several tasks defined in the Task Scheduler. They're all working fine. They are written in the REXX language (about the only language I'm proficient in).

Yesterday, I made a small change to one of the scripts and ran it manually, from the Task Scheduler (to ensure that it ran correctly in the scheduler environment).

The script ran to completion, but the status remained "Running". I've spent the last 24 hours trying to work out why the task sticks at "Running", only to discover that closing and re-opening the Task Scheduler makes the status revert to "Ready".

It looks like the Task Scheduler is not updating the status, when the program exits. Is there anything I can do about this (I suspect the pragmatic answer is "ignore it").

Are my scripts supposed to do something to signal to the scheduler that they've terminated?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Arbico/Quiet i7377
OS
Windows 7 Ultimate x64
CPU
3.40 gigahertz Intel Core i7-3770 Multi-core (4 total)
Motherboard
ASUSTeK COMPUTER INC. P8Z77-V LX Rev X.0x
Memory
16Gb
Graphics Card(s)
AMD Radeon HD 7700
Sound Card
AMD High Definition Audio Device
Monitor(s) Displays
Samsung 2443BW/Lenovo L2240pwD
Screen Resolution
1920x1200 1050x1680
Hard Drives
OCZ-VERTEX450 (256 GB)
ST31000524AS (1000.20 GB)
Drobo 5D 5-disk enclosure
Seagate USB 1Tb
ST1500DL 003-9VT16L 1500.30 GB
Case
Special noise-reducing case
Cooling
Quiet fans
Keyboard
Lenovo SK-8815 Multimedia keyboard
Mouse
Logitech MX
Internet Speed
~7mbps
Antivirus
Microsoft Security Essentials (and caution)
Browser
Chrome/Opera/Firefox/IE/Off-by-One
Other Info
Acoustic Energy AEGO-M Speakers - incredible sound, given their size.
There is probably nothing wrong from what you describe. Pressing F5 or Refresh from the Actions pane does the same thing as re-opening Task Scheduler. I've noticed the same thing and it seems the Task Scheduler GUI is just not updated so you have to do it manually.

If your scripts automatically terminate the process when they've finished then the only thing you might want to do is set an proper exit code (if you want). This can be seen in Task Scheduler in the column "Last Run Result" for every task. For windows batch files this is how to do it: Exit - Terminate a script | Windows CMD | SS64.com
0 is the default exit code. If I terminate a batch file with Ctrl+C it will instead show 0xC000013A as Last Run Result.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Elitebook 8540p
OS
Windows 7 Pro 32
CPU
Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz
Motherboard
Hewlett-Packard 1521
Memory
4,00 GB (Usable 2,98)
Graphics Card(s)
NVIDIA NVS 5100M
Sound Card
NVIDIA High Definition Audio
Screen Resolution
1600x900
Hard Drives
INTEL SSDSA2CW120G3
Antivirus
F-Secure Internet Security
Browser
IE, Firefox, Opera
Other Info
Sandboxie,
SRP (Software Restriction Policy),
EMET (Enhanced Mitigation Experience Toolkit),
WFC (Windows Firewall Control by BiniSoft),
Malwarebytes Premium
Thanks, Tookeri

Now my only problem is remembering that F5 is "Refresh". As far as I can see, there's nothing to tell me. It would be nice if there were an entry under "Actions" such as "Refresh (F5)" to remind me.

Perhaps my browsers will help me. I've always used Ctrl+R to refresh/reload webpages; now I can use F5 instead. Wonderful!

I like to learn something new each day, and here it is, 06:50 in the morning and I've already got my new fact for the day. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Arbico/Quiet i7377
OS
Windows 7 Ultimate x64
CPU
3.40 gigahertz Intel Core i7-3770 Multi-core (4 total)
Motherboard
ASUSTeK COMPUTER INC. P8Z77-V LX Rev X.0x
Memory
16Gb
Graphics Card(s)
AMD Radeon HD 7700
Sound Card
AMD High Definition Audio Device
Monitor(s) Displays
Samsung 2443BW/Lenovo L2240pwD
Screen Resolution
1920x1200 1050x1680
Hard Drives
OCZ-VERTEX450 (256 GB)
ST31000524AS (1000.20 GB)
Drobo 5D 5-disk enclosure
Seagate USB 1Tb
ST1500DL 003-9VT16L 1500.30 GB
Case
Special noise-reducing case
Cooling
Quiet fans
Keyboard
Lenovo SK-8815 Multimedia keyboard
Mouse
Logitech MX
Internet Speed
~7mbps
Antivirus
Microsoft Security Essentials (and caution)
Browser
Chrome/Opera/Firefox/IE/Off-by-One
Other Info
Acoustic Energy AEGO-M Speakers - incredible sound, given their size.
Back
Top