I just want to echo my string after 1 hour. I saw at command but it can run script at specific time (HH:MM). I want my echo command to run after 1 hour whatever the time it is.
When you start up your computer press ctrl + alt + t and type amazon-sync then minimize the terminal window. Command will run once every 5 minutes (300 seconds).
basic 3. /usr/bin/vim. tiny 4. /bin/ed Choose 1-4 [1]: Make a new line at the bottom of this file and insert the following code. Of course, replace our example script with the command or script you wish to execute, but keep the */5 * * * * part as that is what tells cron to execute our job every 5 minutes.
It is sleep 60m && ls
According to the sleep man page, sleep will
Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number. Given two or more arguments, pause for the amount of time specified by the sum of their values.
So you can either use sleep 1h, sleep 60m or sleep 3600s or just sleep 3600 to sleep for 1 hour and then execute your command ls after that. For example sleep 1h && echo "hello world".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With