The question is published on by Tutorial Guruji team.
If I’m executing a long process, is there any way I can execute some time-based commands?
For example, I’m running a really long process which runs for roughly 10 minutes.
After 5 minutes, I would like to run a separate command. For illustration, the separate command could be:
echo 5 minutes complete
(Note: I don’t want progress toward completion of the command, but simply commands executed after specified intervals.)
Is it possible?
long-command & sleep 300; do-this-after-five-minutes
do-this-after-five-minutes will get run after five minutes. The
long-command will be running in the background.