Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # For crontab: 0 23 * * * $0
- sudo -u jonathan bash -c '
- printdate() {
- date "+%R"
- } # prints the time
- for i in {30,15,15,15,14} # 23:00, 23:30, 23:45, 00:00, 00:15
- do
- zenity --info --title="GO TO BED!" --text="Go to bed NOW!!!! Time: $(printdate)" &
- sleep $i\m
- done
- zenity --info --title="SHUTTING DOWN" --text="BYE! SHUTTING DOWN IN 1 MIN!" &
- # 00:29 '
- #sleep 1m
- #shutdown 0 # 00:30 - SHUTTING DOWN!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement