Topic Options
#47951 - 05/20/14 08:55 AM Stoping and starting Planetpress via A script
Alain B Offline
OL Guru

Registered: 09/30/08
Posts: 101
Loc: Montreal
Hi Is there a way to stop all planetpress services and start them via a dos script?

Long time ago we experienced problem with Planet Press, someone from objectife lune suggested that we stop and restart Planetpress each day.

So we created a script who is called via scheduler
the script is
net stop "PlanetPress Watch 7"
sleep 120
net start "PlanetPress Watch 7"

This was working for more than a year then its started to give us problem because Planetpress refuse to stop

I also found that sometime it give error when sending new configuration, I have to kill it then restart it.

It look like it hang somewhere because it say process zzz is still running... where zzz is all the process in the config.

Top
#47952 - 05/20/14 09:38 AM Re: Stoping and starting Planetpress via A script [Re: Alain B]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4953
Loc: Objectif Lune Montreal
Hi Alain,

When trying to stop the PlanetPress service, it won't stop until it has no more jobs left to process. If the service refuses to stop, it may be that it is still processing jobs. It's possible that it may be stuck on a job that it's unable to complete, however, in which case you'll have to kill the service, as opposed to just stop it. (but by doing so, you lose whatever job it was processing)

The problem isn't really the script, but rather the fact that a process is getting stuck for some reason. There could be many causes for this, it could be a problem with the data and your PlanetPress document, or it could be something else. If you'd like to investigate this further, I suggest that you contact Technical Support. They will be able to look at your files, and figure out what could be wrong. You may call 1-866-348-5863, and request Technical Support. Or you can use the web page:

http://www.objectiflune.com/OL/en-CA/Support/ReportIssue/PlanetPressSuite.aspx

Regards,
Raphaƫl Lalonde Lefebvre

Top
#47955 - 05/20/14 09:49 AM Re: Stoping and starting Planetpress via A script [Re: Alain B]
Alain B Offline
OL Guru

Registered: 09/30/08
Posts: 101
Loc: Montreal
Hi Raphael is there a way verify that it is stopped and if not to send a kill signal via a script, I don't want to wake each night just to be sure the stop / restart worked.

Top
#47956 - 05/20/14 09:54 AM Re: Stoping and starting Planetpress via A script [Re: Alain B]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4953
Loc: Objectif Lune Montreal
I'm not sure, to be honest. The "net" command doesn't appear to have a "kill" option, and I don't know if there's anything you can use to monitor the service without using some sort of third-party program.

Perhaps trough a vbscript, or maybe a third-party program. You could probably get something more sophisticated, but I do not have anything to give you at this time, so you'll probably have to do some research on Google.

I would still suggest that you get the problem investigated by Support, as it's not supposed to get stuck in the first place.


Edited by Raphael Lalonde Lefebvre (05/20/14 09:55 AM)

Top
#47957 - 05/20/14 10:10 AM Re: Stoping and starting Planetpress via A script [Re: Alain B]
jim3108 Online   content
OL Expert

Registered: 04/19/10
Posts: 277
Loc: London, UK
Instead of using "net" command which is the friendly version use Windows shell and type:

Code:
taskkill /f /im "program_name.exe"

This will end any resident process - process for PP I believe is "PPWatchService.exe"
Raphael can correct me if that is wrong.

I should add that it is definitely best to find out why the process is hanging...sounds like a never ending loop or something or it's waiting for input that never comes.


Edited by jim3108 (05/20/14 10:18 AM)
Edit Reason: Addition

Top
#47980 - 05/20/14 04:58 PM Re: Stoping and starting Planetpress via A script [Re: Alain B]
Alain B Offline
OL Guru

Registered: 09/30/08
Posts: 101
Loc: Montreal
I know it will be best to find why it does that but since it happen less than 10 times a year im suppose it the same reason why we have to stop and restart planetpress each night...

Top
#47983 - 05/20/14 05:35 PM Re: Stoping and starting Planetpress via A script [Re: Alain B]
jim3108 Online   content
OL Expert

Registered: 04/19/10
Posts: 277
Loc: London, UK
Ok well create a .bat file and put the following in it:
Code:
net stop "PlanetPress Watch 7"
sleep 120
taskkill /f /fi "IMAGENAME eq PPWatchService.exe"
net start "PlanetPress Watch 7"

This should then wait and see if PP stops by itself and will kill it anyway regardless on whether it's successful or not.

NB: It is important to know that anything caught in PlanetPress memory will be lost when the service is killed


Edited by jim3108 (05/20/14 06:17 PM)
Edit Reason: Added to script

Top
#47992 - 05/21/14 09:23 AM Re: Stoping and starting Planetpress via A script [Re: Alain B]
Alain B Offline
OL Guru

Registered: 09/30/08
Posts: 101
Loc: Montreal
Ok Thanks

Top