Quantcast
Viewing all articles
Browse latest Browse all 11372

SCHTASKS not accurately reporting status

I started by posting this in the Microsoft Community under Windows 7 and was told that it is too technical, that I should re-post it here, so here it is....  Presently this code is running on Win/7 machines (Pro and Ultimate), but it was working under XP, but the results are different (that isn't the point). The problem is that I can't find out, with a program, when a task is running that was started by command, instead of the Trigger condition.:

I have a task on machine-B (Win7/Pro) that I start from machine-A (Win/7 Pro) when I want it to run (via a program I issue "SCHTASKS /RUN /TN xxxx /S Machine-B").
When I run SCHTASKS from machine-A to see the status of the running task, it always shows that it is READY, not that it is running.
If I run SCHTASKS on machine-B it too shows the task as READY, not running.
If I go into Task Scheduler on Machine-B and ask it to display all running tasks, it shows that it is running,
If I display the tasks it shows that it is READY
If I click on that task, then the HISTORY tab, it shows that it was triggered, started, created, and does not yet show that it has completed.

This seems very inconsistent to me and I wish that the SCHTASKS /Query /S Machine-B would show the task running because it IS running.

Have I missed something? Is there another way, or is this a bug in Task Scheduling (across multiple platforms possibly)??

THEN I ADDED THIS:

My user name/password exists on both machines (As an administrative sign-in) and while I was duplicating events as part of writing this question, I was signed into both machines. This is not part of a domain, just peer computers on my personal LAN, with the same workgroup name.
ALSO, note that when I use the command SchTasks or Scheduled Tasks, the status of the task in question shows READY even though it is running when I ask Scheduled Tasks to tell me all running tasks, or I examine he history of the specific task, I can see that it was started and has not ended.
When displaying the tasks within Scheduled Tasks gives the same results as when I use SchTasks either locally or remotely (from the other computer) - that the task is READY, but not running. Other tasks may show up as RUNNING, but not the one I started with the SchTasks /Run command from the other machine.

I think that there is a flaw in the Scheduled Tasks and SchTasks that if the task was forced to run, not started because of a event in the schedule (trigger), it does not show up as Running. Only if the task is running because the TRIGGER started it does the task show up as RUNNING when querying SchTasks or looking within Scheduled Tasks. 

HELP ??


Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>