A method and system for treating a biological fluid within a container by subjecting the container to light is provided. The system includes a fluid treatment chamber for receiving the container of biological fluid; an agitation assembly for oscillating the container of biological fluid within the fluid treatment chamber including a variable speed motor; one or more light sources in proximity to the fluid treatment chamber; at least one sensor for sensing a condition of the biological fluid in the container; and a programmable controller. The programmable controller is further configured to operate the variable speed motor to oscillate the container of biological fluid within the fluid treatment chamber at an initial oscillation rate; activate the one or more light sources; receive a signal indicative of one or more sensed conditions of the fluid in the container; and vary the speed of the motor to adjust the oscillation rate of the container of biological fluid within the fluid treatment chamber based on the sensed conditions.