How can I run a command (a script) after boot? [duplicate]

Two solutions:

The first one is to put the full path of the command in /etc/rc.local:

/mypath/mycommand

or, the cron way:

crontab -e

@reboot cd /mypath;./mycommand

From the crontab manual:

 @reboot        Run once, at startup.