linux - Script to run a command at 10 o'clock -


i know how run script run command on pc if time equal x. have heard of at command , others i'm trying make mine bit unique.

the problem when try script, when computer on , run it, checks hour if turn pc on @ x:36 or something, refresh occur @ hour after x 36 minutes, advice please!

my script

time="$(date +%h)" echo $time if [ $time != "22" ];     sleep 1h else     zenity --title="asdf" --text="asdf" --info fi 

you don't want sleep 1 hour, want sleep until 2200. gnu date, can use

now=$(date +%s) t=$(date +%s --date 2200) sleep "$now" zenity --title="asdf" --text="asdf" --info 

Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -