Unfortunately, there is no grace period before having to register as an autónomo. There is, however, a grace period once you become an autónomo. Rather than directly paying €250 into Social Security every month, you build up to this level over approximately 2 years. It depends on your age, gender, experience, etc. as to how much you pay initially.
For useful information about registering, here is a guide to How to become an autónomo (freelancer) in Spain.