I have tried using crontab, but it is limited to minutes. Is there any other option?
I have also tried something like:
watch -n 1 sh /path-to-script/try.sh
But whenever I close the terminal it stops. I want something which continuously works in the background.
&
at the end of the command and also would read some aboutdisown
andnohup
- see here for details unix.stackexchange.com/questions/3886/…disown
andnohup
. So if I destroy the terminal on which the script is running it will destroy the program as well. @GeorgeVasiliounohup
, no. Usingnohup [command] &
makes the command ignore the terminal's attempts to kill child processes upon the terminal's logout.