Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Run command after a certain length of time has elapsed? without wasting too much if your time.
The question is published on by Tutorial Guruji team.
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?
Answer
Just run:
long-command & sleep 300; do-this-after-five-minutes
The do-this-after-five-minutes
will get run after five minutes. The long-command
will be running in the background.
We are here to answer your question about Run command after a certain length of time has elapsed? - If you find the proper solution, please don't forgot to share this with your team members.