Control Folding@Home activity based on Swedish hourly electricity pricing.
Folding@Home clients are available for Linux, Mac and Windows. The script is only tested on Ubuntu but will likely work with minor tweaks on other Linux distributions and MacOS.
Python 3.6+
pip install -r requirements.txt- Set
areaapplicable to your location. Choose one of the supported Swedish regions. - Set
price_thresholdas the maximum spot price you are willing to pay. Folding@Home will pause if spot price exceeds this value. - Set Folding@Home socket
addressandport. - Set Folding@Home
config_filesandslots. Commands will be sent to the union of all slots found in config files and explicitly declared slots.
$ sudo touch /var/log/cron/fah-power-control.log
$ sudo chmod 777 /var/log/cron/fah-power-control.log
$ crontab -e
# m h dom mon dow command
0 * * * * /path/to/envs/bin/python /path/to/fah-power-control.py >> /var/log/cron/fah-power-control.log 2>&1