By configuring the session timeout to be 25 minutes, you allow the Spark session to remain active between runs, preventing it from shutting down between each 40-minute interval. Since each session runs for 15 minutes, setting the timeout to 25 minutes keeps the session warm and reduces the initialization delay.