i tried to google but had no luck perhaps because i am not sure on the terms to look for. basically im trying to auto run a screen after the system reboots. i tried crontab but it seems that i cannot execute the jar file unless im in the directory.
something like
crontab -e
:
@reboot screen -d -m -S ModBot java -jar /home/themoduser/modbotfiles/ModBot.jar start
im not sure if that is a correct method or if trying to use a .sh script:
cd /home/themoduser/modbotfiles/
screen -d -m -S ts3bot java -jar ModBot.jar
and in crontab
@reboot /home/themoduser/modbotfiles/ModBot_startscript.sh start