OKAY, I made it by systemd. I know there is plenty of information to do, but I put the answer for myself and for others who needs.
SYSTEM : RPI 3B+ / raspbian
PROGRAM : infinite loop written by python 2.7
ENVIRONMENT AND REQUIRED IO : GPIO switching (22,27,17) for software-serial / 5,6 for normal callback switching
tried rc.local but it wasn't successful. And usually it is quite unstable way to do. So please do it for systemd method if anyone need to do.
I found most simple solution below link posted by "Frollo"
https://www.raspberrypi.org/forums/viewtopic.php?t=197513
You can execute it by python hello_world.py. If you get boring reading so many hello worlds, press Ctrl+C (or Cmd+C on OSX) to stop it. Save this file as hello_world.py in your home folder (home/pi/). Now we're going to define the service to run this script:
cd /lib/systemd/system/
sudo nano hello.service
The service definition must be on the /lib/systemd/system folder. Our service is going to be called "hello.service":
[Unit]
Description=Hello World
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/hello_world.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Here we are creating a very simple service that runs our hello_world script and if by any means is aborted is going to be restarted automatically. You can check more on service's options in the next wiki: https://wiki.archlinux.org/index.php/systemd.
Now that we have our service we need to activate it:
sudo chmod 644 /lib/systemd/system/hello.service
chmod +x /home/pi/hello_world.py
sudo systemctl daemon-reload
sudo systemctl enable hello.service
sudo systemctl start hello.service
sudo chmod 644 /lib/systemd/system/hello.service
chmod +x /home/pi/hello_world.py
sudo systemctl daemon-reload
sudo systemctl enable hello.service
sudo systemctl start hello.service
For every change that we do on the /lib/systemd/system folder we need to execute a daemon-reload (third line of previous code). If we want to check the status of our service, you can execute:
sudo systemctl status hello.service
In general:
# Check status
sudo systemctl status hello.service
# Start service
sudo systemctl start hello.service
# Stop service
sudo systemctl stop hello.service
# Check service's log
sudo journalctl -f -u hello.service
/etc/rc.local
has limitations due to Compatibility with SysV. We have seen many problems here on this site using it. Following the recommendation of the developers from systemd you should avoid using it. You should use a systemd Unit file instead to start your service.