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
Post a Comment