Quit BOINC and tasks from command line

Message boards : Questions and problems : Quit BOINC and tasks from command line
Message board moderation

To post messages, you must log in.

AuthorMessage
Profile Sleepy
Avatar

Send message
Joined: 29 Dec 16
Posts: 6
Italy
Message 77659 - Posted: 28 Apr 2017, 17:23:08 UTC

Dear all,
I have looked everywhere without luck. Therefore I hope I am not asking an already solved and known problem (apologies in this case), but be assured that I tried to make my duty of an accurate search! :-)

In brief: is there a way to quit BOINC AND the running tasks from a command line in Windows?

I have tried most of the solutions suggested specifically for BOINC (including of course boinccmd) or for a generic Windows program without luck.
I have managed to quit BOINC, but I never managed to quit the client applications at the same time (or right after/before that) without making a computing error out of it (Not what you call a gracious quit...).

Is there a simple (or not simple way) I have overlooked?

Thank you in advance!

Sleepy
ID: 77659 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 77663 - Posted: 28 Apr 2017, 19:26:07 UTC - in response to Message 77659.  

<code>boinccmd --quit</code> should work like BOINC Manager->File->Exit, and therefore allow all tasks to stop running and exit the client.
Under Windows you best run boinccmd from the programs directory, or add the path to the programs directory to the Windows %PATH% environment variable.
ID: 77663 · Report as offensive
Profile Sleepy
Avatar

Send message
Joined: 29 Dec 16
Posts: 6
Italy
Message 77666 - Posted: 28 Apr 2017, 22:18:43 UTC - in response to Message 77663.  

Thank you Ageless.
I sort of already tried that a bit, but I gave it another shot today after your suggestion.

At least in my systems,
boinccmd --quit
quits all clients and empties the BOINCManager windows.
But it does not quit BOINC. If I wait enough, it reconnects and also the clients restart.
So, I could do a
boinccmd --quit
and then
taskkill /im boincmgr.exe
to force kill the Manager.
But issuing a
taskkill /im boincmgr.exe
gives back a signal sent to the process. But the process (BOINC Manager) does not start. After a short while, also the clients restart.
Back to square 1...

Is it just me, or it does not work?
What am I doing wrong? :-(

Thank you for any clue. :-)

Sleepy
ID: 77666 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 77667 - Posted: 28 Apr 2017, 23:20:13 UTC - in response to Message 77666.  
Last modified: 28 Apr 2017, 23:20:33 UTC

In your initial post you didn't say you were running BOINC Manager as well. Of course when one kills the client, but leaves the manager running, it will restart the client. I'll check into a possible command line option for the manager tomorrow, as I was just about to go to bed.
ID: 77667 · Report as offensive
MarkJ
Volunteer tester
Help desk expert

Send message
Joined: 5 Mar 08
Posts: 272
Australia
Message 77669 - Posted: 29 Apr 2017, 4:02:50 UTC
Last modified: 29 Apr 2017, 4:08:33 UTC

If you are using the manager and want to exit both you need to enable the exit dialog and the do File -> Exit and when the dialog box comes up tick the box to shut down the core client and then click the Okay button.

You could shut down the manager as above but leave the core client running (ie don't tick the box) and then your boinccmd should handle shutting down the core client.

If trying to do it from a command prompt your issue will be the manager tries to start the core client if it isn't running. The manager does have a couple of parameters you can pass it. Have you tried running boincmgr --help (or boincmgr /?) from a command prompt?
MarkJ
ID: 77669 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 77672 - Posted: 29 Apr 2017, 9:57:57 UTC
Last modified: 29 Apr 2017, 10:26:43 UTC

Okay, I thought that between the various command line switches there would be an option to exit the GUI from the command line, but apparently there isn't.

I however started <code>boincmgr /b --quit</code> which started only BOINC Manager, which after 2 minutes is now telling me it cannot connect to a client and if it should try again? Clicking No stops the manager from trying, clicking Yes just has it try again.

Not very useful for you, I know.
But if you do not want to use the GUI, then why start it up?

You can start the BOINC client by itself:
I have a shortcut on my desktop that does <code>P:\BOINCProgram\BOINC\boinc.exe --detach_console</code>, it starts the client and closes the command line window. However, in my case my BOINC programs directory is in a different place than the default one, which is C:\Program Files\BOINC, or C:\Program Files (x86)\BOINC, depending on 64bit or 32bit version.

If either is the default place for your BOINC as well, it becomes <code>"C:\Program Files\BOINC\boinc.exe" --detach_console</code> or <code>"C:\Program Files (x86)\BOINC\boinc.exe" --detach_console</code>, you add double quote marks around the path, because of the space(s) in the path. Leave the command to close the console outside the quotes.

To stop BOINC Manager from starting automatically with Windows, do BOINC Manager->Options->Other Options...->uncheck Run Manager at login?->OK.

Edit: typo, thanks Ricky. :-)
ID: 77672 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5077
United Kingdom
Message 77674 - Posted: 29 Apr 2017, 10:21:07 UTC - in response to Message 77672.  
Last modified: 29 Apr 2017, 10:22:44 UTC

Only one 'e' in detach.

If either is the default place for your BOINC as well, it becomes "C:\Program Files\BOINC\boinc.exe" --detach_console or "C:\Program Files (x86)\BOINC\boinc.exe" --detach_console, you add double quote marks around the path, because of the space(s) in the path. Leave the command to close the console outside the quotes.
Why don't your colour <code> tags work for me?
ID: 77674 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 77675 - Posted: 29 Apr 2017, 10:27:37 UTC - in response to Message 77674.  
Last modified: 29 Apr 2017, 10:28:55 UTC

Why don't your colour code tags work for me?
Administrator title. :)
Thanks for the proof-read, I edited the original post.

(I now have to make the code tag a non-tag or else everything is that red... ;-))
ID: 77675 · Report as offensive
Profile Sleepy
Avatar

Send message
Joined: 29 Dec 16
Posts: 6
Italy
Message 77676 - Posted: 29 Apr 2017, 10:41:38 UTC - in response to Message 77675.  

Thank you Ageless.

I like to look at what is going on from time to time, therefore I use the GUI.

I can try to go just with the console, as you do, and perhaps peek at the traffic with tools like BoincView, without the GUI get into the gimmick.
But you know, old habits are hard to beat and I still like the display of the old GUI (though running latest BOINC)!

Thank you, I will give a try anyway to this route!

Sleepy
ID: 77676 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 77678 - Posted: 29 Apr 2017, 11:31:04 UTC - in response to Message 77676.  

I like to look at what is going on from time to time, therefore I use the GUI.
Well, that's possible. Nothing against that. Just do know you can exit BOINC Manager without exiting the client (and running tasks). Which is what MarkJ pointed out already.

To clarify: when exiting BOINC Manager you have the exit manager dialog (and if you do not, go to Options->Other options...->check "Enable Manager exit dialog?"->OK) by doing File->Exit BOINC->uncheck Stop running tasks when exiting the BOINC Manager->OK. This leaves the client and tasks running, but exits BOINC Manager (the GUI).
ID: 77678 · Report as offensive

Message boards : Questions and problems : Quit BOINC and tasks from command line

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.