Please do a search on RunAs, I must warn you that this is bad security.

No matter how hard you try to encrypt your password, there is always a risk.

Look at Scheduled Tasks for a more secure way.

Thanks