Watchdog rule doen't execute script

Started by mimin0, November 11, 2013, 11:58:56 AM

Previous topic - Next topic

mimin0

Hi, I have some problem with restart service
I created rule: execute resstart_foo_service script when foo_procces is using more than 500MB virtual memory
But this rule is executing only when user is logged in this OS, if user is logged off the rule doesn't execute

script:

time /T >> C:\foo\restart.log
date /T >> C:\foo\restart.log
net stop foo_Service && net start foo_Service >> C:\foo\restart.log


rule:


could your, please, help me with this issue?

edkiefer

not really up on scripts but could it be the service is set to log on only with a specific  account , not local system account .
can you start/stop service manually while logged off ?
Bitsum QA Engineer

mimin0

my foo_service logged on as Local System account

maybe problem in executing the restart.bat script? maybe try execute his in background?

hanemach_gt

Let's start with that a batch file is not "as" executable as "normal" EXE files. To call batch files, you use cmd.exe with the /k parameter,
so I believe your input should be like:

Launch path:
C:\Windows\System32\cmd.exe

Command line:
/k "C:\yourscript.bat"

If the launching method you described works, carry on to reading my post without worrying about my previous scribbles.

You'd want your Process Lasso's instance to start during boot as a service, in this window...



...make sure you have the option "Start core engine as a service a system boot" checked (Pro version required).
I think you will have to provide the program with login credentials (that is, after checking the aforementioned option) so that it will run as Administrator, for instance (or different account that is high-privileged). Try playing with these service-related settings. Make a system restore point before you make any changes to boot settings. Try without giving login information first, and check if it works. If it doesn't, try the same with checking "Run the service as a specific user" and providing login credentials.

That's what I would advice. I encourage you to wait for the response of the Official Support, they will give you 100% sure answer.
<img src="[url="http://imageshack.com/a/img913/7827/On37F9.gif"]http://imageshack.com/a/img913/7827/On37F9.gif[/url]"/>