5

I want to take a break from my system after every one hour. How to enable Popups(I mean Pop ups, not notifications). OS: Ubuntu 16.04 LTS, Unity DE

5

You can run a cron every hour.

crontab -e

Add this line (if you have xcowsay installed):

0 * * * * env DISPLAY=:0 /usr/games/xcowsay -t 0 "Coffee Break!"

To install xcowsay:

sudo apt install xcowsay

Screenshot:

enter image description here

| improve this answer | |
  • I am a beginner in using crons. I cant understand where to head after installing xcowsay. Where shoud I add the line"0 * * * * env DISPLAY=:0 /usr/games/xcowsay -t 0 "Coffee Break!" "? Also, do I need to enter this command "crantab -e" everytime in order for cron to work? – Siddharth Barhate Mar 6 '18 at 3:37
  • @SiddharthBarhate You only need to run crontab -e when you want to edit your cron jobs. After that they will always automatically run at the times you specify. The line that you are adding should be at the bottom. Have a look at the cronhowto for more information. – stumblebee Mar 6 '18 at 3:51
  • the cron jobs are runing after 10 mins, not one hour? Also please edit your answer to crontab -e instead of crantab -e – Siddharth Barhate Mar 6 '18 at 8:33
  • @SiddharthBarhate fixed typo ty. The first field is minutes which is set to "0" in this example. So if you started the cron at 8:50 then it would run at 9:00 (10 minutes later). The next run would be at 10:00 and every hour thereafter. – stumblebee Mar 6 '18 at 18:46
0

Also, you may want to consider the package workrave. It can be set to lock the screen after an hour (or any other time period) and suggest exercises.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.