Executing a command at startup

Hey all,

How do I execute a file at startup automatically.

From what I've read is that I need to put it into my .bashrc file. I'm not sure where to go from there. Can I just type commands into that and they'll run next time I restart my server?

Right now I have added these lines:

cd SmartFoxServer_PRO_1.6.2/Server/
./start.sh

I don't want to restart my machine until I know this is correct...

Thanks,
Nathan

Your question is somewhat confusing. Are you talking about when you login or when your system is booted up? They are two entirely different scenarios.

Well, I suppose it would be for login as it needs to run a shell script that starts a server program. If either would work, I would like to use the easier approach.

Thanks for the response,
Nathan