[op5-users] Delaying notifications to a specific time

Marcus Rejås marcus at rejas.se
Wed Jan 14 15:46:20 CET 2009


On 01/14 15:31, Mikael.Schmidt at ixx.se wrote:
> Hi,
> 
> I have a situation where I need to delay notifications between 2300 to 0500
> to be sent after 0500. Have anyone come across this situation and perhaps
> already have a final solution?
> 
> I'm thinking of making a new notification-script that checks the current
> time, if it's between 2300-0500, put the notification in a folder and then
> have a crontab'd job running at 0500 to check if there is any delayed
> messages and if there is, send them. This applies for both e-mail and sms
> notifications.

I would do it like that. Maybe even simplier. Make a notification script
called "batch-notify" or whatever that just catinates the notifications with
a smart fomat to a textfile (there could be different files for different
times, you might call them queues). Use this on a contact with the derired
notification_period.

Another skript run by cron (just as you suggests) parses the file and uses
the regular notification scipt to send notifications.

Almost the same idea as yours (maybe not as good), just start hacking and let
us know the outcome! :-)

Regards,

  /Marcus

-- 
Marcus Rejås          jabber:   marcus at jabber.rejas.se  ,= ,-_-. =. 
Rejås Datakonsult     e-mail:   marcus at rejas.se        ((_/)o o(\_))
Kaserngatan 1         web:      http://www.rejas.se     `-'(. .)`-' 
s-761 46 Norrtälje    gpg-key:  http://gpg.rejas.se         \_/ 


More information about the op5-users mailing list