PNCE Calendar Docs: Automatic Emails


PNCE Calendar Application Documentation

Automatic Emailing of Seminars, Colloquia

The PNCE Calendar Application sends email out to the colloquia mailing list periodically to inform people of the following weeks colloquia and seminars, and to inform them of changes in the schedule. Normally these are done automatically from a cron job, but there is a fair degree of flexibility provided for unusual situations.

The application consists of a pair of perl scripts invoked from cron to send out the email, both located in /group/phys-admin/project/Calendar/perl-scripts:

  1. mail_seminar_list.pl: This will send out an announcement of all seminars for the next calendar week from the current date (Sunday through Saturday). Typically run weekly from crontab, every late Friday afternoon.
  2. mail_seminar_updates.pl: This will send out a list of changes/corrections to the calendar since the last mailing. Basically, any event with a modification date after the last mailing, that did not already occur, and whose date was covered by the last mailing, is included in the list. No email gets sent out if no events match the criteria. Typically run from crontab daily, in the early morning. Most times should not produce any email.

Both scripts are controlled by files in /group/phys-admin/project/Calendar/data/email_status. The following files are used:

The files containing timestamps should consist of a single line of text containing a number representing the number of seconds since 1970.

mail_seminar_list.pl simply takes the reference date (by default now), computes the following calendar week (Sunday through Saturday), collects all events in that time range, and mails a list out. It will not send anything out if the reference date is not at least a specified time period (e.g. 3 days) later than the timestamp in last_weekly_email.

mail_seminar_updates.pl takes the reference date (by default now), and the timestamp from last_sem_date. It also takes the later timestamp from last_weekly_email and last_update_email, as last_mail. It makes a list of all events in the time range from the reference date to midnight on last_sem_date with a modification date after last_mail. This list, if not empty, is then mailed out. No mail is sent if the list is empty, or if reference date is too close to last_update_email date (typically must be at least 22 hours after). Note that last_update_email is updated even if the list of events is empty (even though no mail sent out).

Both scripts take a number of optional arguments, mainly for testing and debugging. When used in production, would most likely only use the argument --quiet, or maybe no arguments. The arguments are basically the same for both scripts:


Main Physics Dept site Main UMD site


Valid HTML 4.01! Valid CSS!