I am developing an application based project and I am almost done with it. Now I need to covert that to a commercial level product. As it is application specific I want my code to run as soon as I power up my pi. Is there any method to run a code without giving commands through gui or even a trigger through a gpio port will do.
 @Ghanima's answer is way better than this one, go check it !
You could use
cron and add an @reboot task:
crontab -e as root or
sudo crontab -e will allow you to edit your cron.
will execute that script once your computer boots up.
To start anything on boot you just add command to /etc/rc.local
So something like:
Don't forget to change permission of the script to execute (chmod +x /path/to/script)
There is nothing wrong with the aformentioned solutions of
rc.local but there are also other nice tools out there that help you do that and bring additional benefit.
supervisor is such a system to monitor and control a number of processes on UNIX-like operating systems. Nice benefit is that it not only starts programs at boot time but also tries to restart them if they fail and crash. Follow the excellent documentation to set it up and configure multiple conditions according to the needs of the project.