how to do a one time task in arduino ????

tnk u sir ! is this the exact code i needed and i'll just paste it on my sketch ? tnks!