Linux command line tricks

Schedule a script or command in x hours, silently run in the background even if logged out

( ( sleep 5h; your-command with the arguments ) & )

Dissection of the script

sleep 5h;your-command with the arguments

This will put the command to sleep for the time mentioned. Here 5 hours.

once the sleep is done, the command is executed

Put the whole thing to background}

Leave a comment

Your email address will not be published. Required fields are marked *