Reminder/Alarm Notification

Author Message

Kunal Patel

Thursday 11 November 2010 3:42:50 am

Hi,

I need to create a custom notification, which will send a reminder before the end date of a task/event.

I need to do this so that it will work with task module in ezteamroom extension.

My plan was:
1). Create a custom reminder notification event. (copy of publishNotificationEvent)
2). Create a custom reminder notification event handler. (copy of pubilshNotificationHandler)
3). When a task is created a reminder notification would be created (added to the database) with reminder send_date set to 7 days before the end_date of the task.
4). The reminder notification handler would the process the notification on the given send_date.

I have managed to do 1, 2, 3 and part of the 4 above but cannot process the notifications in database. I can see the notifications are present in the database but cannot understand how to process them using the handler.

Can someone advice me how I can get this to work or whether my approach is correct. Alternatively, someone may have created this feature already.

I have searched on the community portal but really surprised to find there is not a lot of information or interest in having the facility to receive reminder notification of tasks/meetings/events prior to the end date.

Maybe the feature already exists in ezpublish but I have failed to identify it.

I would really appreciate some help on this.

regards
Kunal

Robin Muilwijk

Sunday 14 November 2010 12:29:56 am

Hi Kunal,

I'm no expert on this, but I suspect it has to do with the cronjobs and configuration of them. See http://doc.ez.no/eZ-Publish/Technical-manual/4.4/Features/Notifications/(language)/eng-GB and the processing paragraph of this doc page. See if looking in this area helps you, if not please let us know.

This is indeed an interesting topic to get some more details on for users. Thanks for bringing it up.

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Kunal Patel

Monday 15 November 2010 2:26:25 pm

Hi Robin,

I have already looked the document you suggested and unfortunately it doesn't really help. The documentation simply describes how to run the cronjobs and studying the cronjobs/notification.php and runcronjobs.php also just executes the events and event handlers.

After studying the above scripts (the best I could), I managed to add the event in the database with a specific send_date. But my handler does not seem to want to process these events.

There is lack of information on how to create custom handlers to process events in various ways (specific send_date). The handler I am using is a copy of the publishNotificationEventHandler. Which processes events of newly published objects. This may be the reason why it is not processing events with a send_date.

If only there was some documentation/examples of how to process events with a specific send_date. I think that would help.

I have run out of ideas now and really tempted to just create a php script outside of ezpublish and process my events in the database. But I would much rather use ezpublish to do this.

regards
Kunal

Robin Muilwijk

Wednesday 17 November 2010 12:10:13 pm

Hi Kunal,

That puts me out of ideas as well. I've sent a note to others requesting to look at your issue.

-- Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 14:59:22
Script start
Timing: Jan 18 2025 14:59:22
Module start 'layout'
Timing: Jan 18 2025 14:59:22
Module start 'content'
Timing: Jan 18 2025 14:59:22
Module end 'content'
Timing: Jan 18 2025 14:59:22
Script end

Main resources:

Total runtime0.0200 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 589.0313152.6250
Module start 'layout' 0.00810.0042 741.656339.4531
Module start 'content' 0.01230.0056 781.109493.5234
Module end 'content' 0.01790.0020 874.632838.2891
Script end 0.0199  912.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002914.4915140.0002
Check MTime0.00126.0771140.0001
Mysql Total
Database connection0.00115.741710.0011
Mysqli_queries0.004823.807230.0016
Looping result0.00000.109810.0000
Template Total0.00168.110.0016
Template load0.00094.481210.0009
Template processing0.00073.578710.0007
Override
Cache load0.00062.813610.0006
General
dbfile0.00094.671080.0001
String conversion0.00000.048940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs