How can I set up the system to automatically close runs a certain number of days before the pay date?

This
feature is available on all PaySpace editions
Navigate > Config > Basic Settings > Company Settings > General Settings > Payroll Settings
Insert the desired number of days that the run should close before its pay date.