How to make PTM timer alert me every 20 mins?

Using applications, configuring, problems
Post Reply
Message
Author
wert
Posts: 258
Joined: Tue 31 Mar 2015, 21:40
Location: USA

How to make PTM timer alert me every 20 mins?

#1 Post by wert »

I need PTM timer to alert me every 20 mins. How?

I tried xwrits but it's unreliable software. You run it and when it feels like it it'll work, it doesn't, just makes me sick.

So puppy has something better than all. That's PTM timer. for example Xwrits doesn't sound an alarm but PTM timer can. To utilize PTM timer, how do I make it to alert me every 20 mins e.g. with a linux command?

I have searched for other solutions such as above xwrits(unreliable) and another called workrave that's only meant for programmers even installation is complex compiling. Thanks in advance for your help
Last edited by wert on Mon 14 Mar 2016, 08:45, edited 1 time in total.

scientist
Posts: 860
Joined: Sat 23 May 2015, 08:21

#2 Post by scientist »

Cussing tends to get your $ unanswered.
Thanks,
Andy


Slacko 6.3.0 FULL INSTALL
JWM
File Manager - Thunar

wert
Posts: 258
Joined: Tue 31 Mar 2015, 21:40
Location: USA

#3 Post by wert »

scientist wrote:Cussing tends to get your $ unanswered.
Thanks for correcting me. I will edit

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#4 Post by Semme »

Simple and works. Your sound, your message..
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

wert
Posts: 258
Joined: Tue 31 Mar 2015, 21:40
Location: USA

#5 Post by wert »

Semme wrote:Simple and works. Your sound, your message..
Thanks dude. BTW how do I make it run every 20 mins? Have pshedule gui omly contains predefined time sets e.g I click 20 under minutes and it says run every hour at XXhours:20 mins. No way to make it every 20 mins dude. Thanks in advance

PLus I can't just divvy up 60 by 20 and assign 20, 40 upto 1hr etc., due to the fact that I don't begin using pc at precise o'clocks e.g 2:00 like the cron works. Each time I start puppy, I need it from that minute to start alerting me every 20 mins dude

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#6 Post by drunkjedi »

I am no scriptor.
This is just logic I derived from watching some script.

At end of your script try adding

Code: Select all

sleep x
replace x with number of seconds you want to wait the script to repeat itself.

But I do belive it will add the time taken to run the script too.
So you may have to reduce the x value slightly.

This is purely a guess.
But just give it a try.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#7 Post by Semme »

It's easy Wert. All will be explained shortly....
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#8 Post by drunkjedi »

Wait I found something good.
Do make script like

Code: Select all

watch -n1200 command
Replace command with your alert command. It will repeat every 1200 seconds.
And place that script in /root/Startup.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#9 Post by Semme »

On second thought, scratch that last comment.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#10 Post by drunkjedi »

Aah that watch command also adds up seconds took to complete the command.

Semme please continue, sorry I interrupted.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#11 Post by Semme »

Pointless!
Last edited by Semme on Mon 14 Mar 2016, 17:46, edited 2 times in total.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#12 Post by don570 »

I wrote ptm timer. It was my first program :lol:
It should be easy to make it repeat by just relaunching itself automatically.

I'll make the change and post the program.

pclock has a countdown feature that repeats.


__________________________________________

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#13 Post by drunkjedi »

HI wert,

Found out how to eliminate the addition of time taken to complete command in the self-repeating script.
Make your script as follows

Code: Select all

#!/bin/sh
while sleep 1200; do (command &) ; done

Replace the "command" with your alert command or script address.

Place this script in /root/Startup.

Done.

I tested this with

Code: Select all

#!/bin/sh
while sleep 5; do (date=`date` && gxmessage $date &) ; done

Edit: I forgot to mention that this script creates a gxmessage window every 5 seconds with current date and time in it.
I ran it from terminal and to kill it I just killed the terminal.

wert
Posts: 258
Joined: Tue 31 Mar 2015, 21:40
Location: USA

#14 Post by wert »

drunkjedi wrote:HI wert,

Found out how to eliminate the addition of time taken to complete command in the se...
Cool dude thnx & let me try

wert
Posts: 258
Joined: Tue 31 Mar 2015, 21:40
Location: USA

#15 Post by wert »

drunkjedi Thanks alot .very simple and effective.

wert
Posts: 258
Joined: Tue 31 Mar 2015, 21:40
Location: USA

#16 Post by wert »

Code: Select all

#!/bin/sh
while sleep 1200; do (txt="Woof" && gxmessage $txt & aplay ~/puppy-reference/audio/2barks.wav &) ; done
works well. Made file executable eg. chmod 777 ~/Startup/20_min_woof and placed it in startup programs so that each time I start puppy it starts auto. Thanks all for all your help.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#17 Post by drunkjedi »

Thanks for asking question, I learned because you asked.
Lol.

scientist
Posts: 860
Joined: Sat 23 May 2015, 08:21

#18 Post by scientist »

drunkjedi wrote:HI wert,

Found out how to eliminate the addition of time taken to complete command in the self-repeating script.
Make your script as follows

Code: Select all

#!/bin/sh
while sleep 1200; do (command &) ; done

Replace the "command" with your alert command or script address.

Place this script in /root/Startup.

Done.

I tested this with

Code: Select all

#!/bin/sh
while sleep 5; do (date=`date` && gxmessage $date &) ; done

Edit: I forgot to mention that this script creates a gxmessage window every 5 seconds with current date and time in it.
I ran it from terminal and to kill it I just killed the terminal.
I would advise changing it to

Code: Select all

while sleep 5; do (date=`date` && gxmessage -timeout 3 $date &) ; done
Because the original if run from the desktop would be a fork bomb. :-)
Thanks,
Andy


Slacko 6.3.0 FULL INSTALL
JWM
File Manager - Thunar

Post Reply