K1000 - Simple script do not always run or get stuck on pending
So I made a simple Kscript to disable Java updates and the problem is that it won't run properly on my test machine.
I tried the "Run now" option and it wouldn't complete, so I launched the same script 3 times in a row and as you can see it only worked once.
Why would a script sometime works and some other time will just get stuck pending.
I'm pretty new to K1000 and I'm trying to find the best way to debug myself.
Any help is much appreciated.
Thanks!
3 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
SMal.tmcc
8 years ago
sounds like you may need to adjust some of your communication settings. You can see the queues under the system page
Have you had a look at the log file of the script?
In the "Run now status" field, open up one of date and time fields highlighted in blue on the left side of the page.
(Seen in your screenshot ...in blue)
Expand the "failed execution" link and read log.
Then.....
Expand the "Successful execution" link and read log.
What is the difference???? - akmagnum 8 years ago
And I've check the successful log and it looks pretty normal, nothing stands out, it does exactly what I expect my script to do which is to change a registry key to disable Java.
I know that doesn't help much and I'm afraid the problem is not Kace but our environnement which can be really slow and unresponsive at times.
17 Hours later the status of the jobs is still on "Running" or "Pending".
*EDIT: Is there a way for me to see the jobs in queue for a device on the device itself? - jmayotte 8 years ago
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy]
"EnableJavaUpdate"=dword:00000000
"NotifyDownload"=dword:00000000
I did not mention this, but I ran the script on the SAME device 4 times in a row and only the last "Run Now" worked. I was already suspecting the problem was not my script. - jmayotte 8 years ago
--------------------
Reg.exe DELETE "HKLM\SOFTWARE\JavaSoft\Java Update" /f
Reg.exe DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f
reg.exe DELETE "HKLM\SOFTWARE\WOW6432Node\JavaSoft\Java Update" /f
reg.exe DELETE HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f
Exit /B 0,1
----------------------
Check - Wait for completion. - davreh99 8 years ago