Kirby Software Forum
January 21, 2018, 06:11:19 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Moved to new web hosting company
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: suspend alarm for 1 hour  (Read 2653 times)
JERRY STYLES
Guest
« on: January 10, 2005, 04:09:16 PM »

tough one here,,,Kirby Alarm's functionality is very close to what we need. Maybe someone here can think of a solution :
 
 Integrate Kirby with another program using "watchfile". Other app sends small change to "watchfile" updates time stamp. Kirby sees timestamp change and sends email Alarm using SMTP.
 
Our applications calls for only one alarm per hour on a specific file change. In other words. if the time stamp changes, send the email , but then if the time stamp changes within the next hour, ignore and don't send email again. After one hour start looking at "watchfile again".
 
Of course, if file was changed within the hour the timestamp will be different. We don't want the email to be sent based on changes that occurred since 1 hour from the previous alarm. Only from that point forward ....
 
Any suggestions would be greatly appreciated.
Logged
Ian Cook
Administrator
Hero Member
*****
Posts: 919



WWW
« Reply #1 on: January 11, 2005, 01:12:06 AM »

Hi Jerry,
Hmm. That is a tough one. From the sound of it you want the date/time of the next alarm to be automatically set to one hour from when it was last executed, not from when it was last checked.
While this can be done it is not available under the current version.
About the best you can do is to set up a recurring hourly alarm..
This way a max of one email per hour will be sent, but it may take up to an hour before it is sent.
For example, say you set up an alarm to execute every hour. (9am, 10am, 11am etc)
At 9am kirby saw a change to the watch file, then sent the email, and then dutifully reset the next date/time to check to 10am
The watch file changed at 9:15am, 9:20am, and 9:50am however because the next date/time has been set to 10am the email will not be sent until 10:00am.
Of course, if there has been no change to the watch file between 9am and 10am then the email will not be sent, and the date/time of the next alarm will be set to 11am.
This is about the best I can come up with a the moment.
Ian Cheesy
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!