Issue
Want run a bash script as root but delayed. How can achieve this?
sudo "sleep 3600; command" , or
sudo (sleep 3600; command)
does not works.
Solution
You can use at
:
sudo at next hour
And then you have to enter the command and close the file with Ctrl+D. Alternatively you can specify commands to be run in a file:
sudo at -f commands next hour
Answered By - Rajish Answer Checked By - David Marino (WPSolving Volunteer)