Timesheet Reminders Configuration

In order to set up email reminders please download and install package 'intranet-timesheet-reminders'. In case the package is not available in your local install, find instructions on how to get it from the code repository. Once downloaded install the package. Once the package is installed, you want to use the default routine 'im_timesheet_reminder_init' to seed the relevant tables. 
im_timesheet_reminder_init(
            weekly_first_timespan::timestamp, -- First day a weekly reminder should be send
            weekly_days_of_week::varchar,     -- Weekday the reminder should be send (0=Sunday, 1=Monday, ..., 6=Saturday)
            weekly_until::timestamp,          -- Last reminder for weekly updates - be generous, a date 20 years from now is fine
            monthly_first_timespan::timestamp,-- First day
            monthly_until::timestamp
)

You are free to adjust the routine or write your very own routine to set specific dates a reminder should be send. The default routine seeds to database for weekly and monthly reminders. Weekly reminders are send out on the weekday provided using parameter 'weekly_days_of_week'. Monthy reminders are send out by default on the 1st day of the following month. A parameter of package 'intranet-timesheet-reminders' determines of reminders are send weekly or monthly.


Example:

Weekly reminder mails are to be send on Saturday 21:00. The first one should be send on Saturday, 21th of December 2013. Monthly reminders should be send on the first day of the following month, the first time on 2014-01-01.
Respective end dates are set to 20 years from now.

select im_timesheet_reminder_init('2013-12-21 21:00'::timestamp,'6','2033-12-21'::timestamp, '2014-01-01 12:00'::timestamp, '2034-01-01'::timestamp);

This script performs the following actions:

  • Creates weekly and monthly 'recurrences':

    Recurrences

  • Fills table 'timespans':

    Timespans

  • Creates calendar items:
    Table: cal_items

    CalItems

  • Creates 'events' and 'event instances':
    Tabel: acs_events

    Events
  • Seeds table 'time_intervals':
    Note: acs_event__insert_instances does create two intervals per event

    time_intervals

Runtime

Based on interval set using parameter 'intranet-timesheet-reminders::EmailReminderInterval', function 'im_timesheet_scheduled_reminders_send' is frequently executed. It checks if there are any events during the last 24h, for which no reminders have been send yet (table: im_timesheet_reminders_stats). For all events due it calls function 'im_timesheet_send_reminders_to_supervisors'.

Remove Entries

To remove entries partly, please see sql's as used in ~/packages/intranet-timesheet-reminders/sql/postgres/intranet-timesheet-reminder-drop.sql

References

 

 

 


  Contact Us
  Project Open Business Solutions S.L.

Calle Aprestadora 19, 12o-2a

08902 Hospitalet de Llobregat (Barcelona)

Spain

 Tel Europe: +34 609 953 751
 Tel US: +1 415 200 2465
 Mail: info@project-open.com