The frequency is hardcoded to 4 seconds: https://github.com/mongodb/mongo/blob/b47deb5910ac97ed1741efad08d5e4a11bdd0740/src/mongo/db/clientcursor.cpp#L269
We would like to make this configurable, so that we can make it run more often in cursor_timeout.js. In that test, we wait 5 seconds for cursors to be killed, so since the background job runs every 4 seconds, this can be insufficient. Rather than waiting for longer (which will make the test take longer), we should make the background job frequency configurable.
It would also be helpful to set verbosity to 1 in cursor_timeout.js, so that we can see the cursor IDs in case a cursors fails to be killed after we make this change.