I want to make a delayed background execution, for delay I use sleep [anyseconds] && [execution]
for background I use nohup
Simple example of nohup
alone:
nohup date &>> out.log &
And of course you can find print out of the execution of date
in out.log
.
But I want to delay the execution, like 15 seconds, so a little combination:
nohup sleep 15 && date &>> out.log &
This time it does not work properly, sleep 15
got executed while the date
will not always do - If you shut down the terminal, it will not execute anything after the &&
.
What is wrong with nohup
? It surrenders to &&
??