Scheduling folding in Windows

Moderators: Site Moderators, FAHC Science Team

Scheduling folding in Windows

Postby Envergure » Mon Jul 15, 2019 2:19 am


I have a pretty powerful Windows 10 machine running Folding, and it makes my home office really hot. It's in an old townhouse without central air. To avoid this, I was wondering if there is a way to schedule folding to run from 10:00pm to 5:00am every day, and from 7:30am to 4:00pm on weekdays. Is it possible to set that up?

Posts: 1
Joined: Mon Jul 15, 2019 2:08 am

Re: Scheduling folding in Windows

Postby bruce » Mon Jul 15, 2019 5:35 am

Yes, there are many ways to schedule programs (including FAH) but none are specifically supported by those who distribute official versions of FAH's programs. It has been discussed elsewhere (including on this forum) but unfortunately you are on your own for finding that support.

Personally, I like the methods that involve sending telnet messages to FAHClient that contain the words like start/stop/fold/pause (along with other words) from simple jobs that run under the batch scheduler contained in your OS. The tools are all there, but it's up to you to use them to do what you want.
Posts: 20009
Joined: Thu Nov 29, 2007 11:13 pm
Location: So. Cal.

Re: Scheduling folding in Windows

Postby MeeLee » Mon Jul 15, 2019 10:55 pm

If the software can set the state of WUs to 'finishing', it'd be the best option.
But if it just turns off the PC, it's no different than methods below (without installing software):

If you don't want to bother with software, here are some alternatives:

Just force your PC to go into, and come out of sleep // hibernation mode using task scheduler.
No need for special software.
This feature is available in Windows, ... matically/ ... ep-windows

or use the 'crontab -e' command for Linux: ... tab-files/

You'll achieve your goal of turning on or off the PC at precise times.
You also don't need to be present at all at sleep or wake times; (just as long as you've verified that WUs restart without errors from hibernation or sleep mode).

It's nearly impossible to time the shut down exactly when WUs are finished.
WUs can run from 0.5 to 5+ hours on modern hardware. When you shut down your PC at a fixed time, chances are you almost always will lose some of the quick return points on those WUs.
Between 0 to 15 minutes, or 1 to 2% of a WU will be discarded when you shut down a PC.
But when putting it into sleep or hibernation mode, those percentages won't be lost, though it may give errors (I don't know); so test it out if WUs can continue folding coming out of a sleep state.

Another solution (but you will also lose (bonus) points on your WUs) is to just plug your router into an AC timer plug.
By turning on or off your router, you can cut your PC's access to the internet.
The PC will continue to finish the WUs it's working on, so after the shutdown of the router, the PC might continue to work for another hour or two, until all WUs are finished.

The good thing is, as soon as you connect again to the internet, the WUs can be uploaded and you'll get immediate points; unlike the above, where the WUs still need to finish after turning on the PC.

The bad thing is, that FAH Client doesn't check when internet access is reestablished, and you will need to manually resume the WUs to start the upload and download.
Also, the PC might or might not have the option to go into sleep mode. I don't know if FAHControl is smart enough to keep the PC from entering into sleep mode when it's folding...
So chances are your PC will remain on (though not folding) for the remaining of the time, until reconnected with the internet.
This option is best when you are present when the PC needs to reconnect to the Internet. (like make it a custom to wake up on time, like when making a coffee, just restart WUs when the internet connection is online); while you don't need to be present when the system goes offline.
Posts: 1097
Joined: Tue Feb 19, 2019 11:16 pm

Re: Scheduling folding in Windows, macOS, and Linux

Postby brett » Sun Jul 26, 2020 1:37 pm

I’m a bit late to this thread, but I’ve just written a guide for how to schedule FAHClient to run only at specific times. My approach configures the FAHClient to pause on start up, and then use scheduled tasks (using tsched, launchd, or systemd) to send pause and resume commands to FAHClient on a schedule. The link includes instructions for Windows, macOS, and Linux.

Posts: 2
Joined: Sat Jul 25, 2020 11:53 pm

Re: Scheduling folding in Windows

Postby bruce » Sun Jul 26, 2020 3:27 pm

I have not tested your code, but in reading your blog, it looks like it should work.

Thanks for your enhancement.
Posts: 20009
Joined: Thu Nov 29, 2007 11:13 pm
Location: So. Cal.

Return to V7.5.1 Public Release Windows/Linux/MacOS X

Who is online

Users browsing this forum: No registered users and 2 guests