fah-client-bastet
fah-client-bastet copied to clipboard
Add support for command line state control
V7 has support for starting (--send-unpause), pausing (--send-pause) and finishing (--send-finish) via the command line for use in task scheduler. I can't find these for v8
Until the client supports those commands, you might try my script:
These options are very useful for text only servers. Other possible candidates:
- Get/set configuration:
--send-command 'options cfg1=value1 cfg2=value2'
(cfg1
to get,cfg1!
to use default value). - Queue information:
--send-command queue-info
. - Dump WU. In v7:
--send-command 'slot-delete 00'
(or01
, etc).
I wonder if a Python interface might be more useful than how this was implemented in v7. A Python script/library could also be run in a continuous mode where it constantly monitored a client. It could also login to your F@H account and give you access to all your machines.
The only downside I see is that Windows users would need to install Python but these days that's pretty easy. Microsoft even offers it in their app store.
There is also no python by default on macOS.
If you try to run python3 the system may offer to install command line developer tools, which includes python3. If one just wants python, they need to download from python.org.
My lufah script is python, runs on all platforms, and is working well for me.
My python skills are admittedly weak. There is no chance of adding node support without a lot of help.
I have not used it, but there is https://pyinstaller.org/
Any progress on restoring the pause/unpause from previous client versions? I am not exactly thrilled to have my system cranking away during work hours. I loved being able to help by setting up scheduler to run in designated hours. May need to drop my participation if this cannot be restored in timely manner.
As far as I know, the only scheduler for v7, besides roll-your-own, was the Chrome Folding in the dark plugin.
See also https://github.com/FoldingAtHome/fah-web-client-bastet/issues/53
Clearly I have not paid attention to my system's F@H efforts. I only recently realized it was not running, so I updated the client. Original setup had systemctl timer services set up as described here: https://www.ctrl.blog/entry/how-to-fahclient-schedule.html#section-linux I would be nice to restore the command input options this solution was leveraging.
You can use those systemd files now with v8 using my script. If needed, install pipx. As the user that will run the service units, pipx install lufah:
pipx install lufah
Modify the systemd files slightly:
ExecStart=/usr/bin/FAHClient --send-pause
Becomes
ExecStart=%h/.local/bin/lufah . pause
ExecStart=/usr/bin/FAHClient --send-unpause
Becomes
ExecStart=%h/.local/bin/lufah . fold
Note that you will not make work unit deadlines if you restrict folding hours too much.
You might prefer to start folding early, then set finish a couple hours later.
v8.4.4 includes a Python script fahctl
that can send fold
, pause
and finish
to the v8 client from the command line. Use @kbernhagen's lufah
for more control options.
Implemented in v8.4.4.
Implemented in v8.4.4.
Where can I read more about how to use the scheduler in Windows to pause and unpause a client at certain times of certain days of the week, on a schedule?
https://learn.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler
To use fahctl, you may need to open a powershell window and install dependencies.
python -m pip install websocket-client
fahctl —help