If the job needs to resume after system reboot, it's a system service. So you have several options:
- Write an init script and add it to your default run level.
- If your distro uses
systemd
write a configuration file to start your command as a service. - You can use another service manager like
supervisord
to automatically run your command. Custom quick and dirty solution. When I need something to run automatically in a
screen
, I often use acron
entry like this :@reboot screen -S my_service -d -m bash -c 'my_command' > /dev/null
At reboot, it will start your command in a screen and detach.