Maintain

Web Maintenance

Keeping web pages from becoming stale is a problem experienced by all web authors. We write pages in a flurry of ambition and excitement, only to forget about them. Weeks, months, years later, visitors read our aged commentary with puzzlement or annoyance.

Department web authors can have their pages generate email reminders, automatically. The reminders can be based on absolute dates, or dates relative to the last modified time of each page. This page describes this mechanism in detail.

<meta name="Maintain" content="trigger">

Web pages are marked for maintenance reminders using the html-standard <meta> tag. Meta tags appear in the <head> section of an html file, and have two attributes, name and content.

The meta-maintain mechanism searches for pages with meta tags named Maintain. The content attribute specifies when an email reminder should be sent, and has the following syntax:

Monday   A day of the week. The web page is checked once a week on the given day, and an email message is generated if the file has not been modified for more than 7 days.
15   A day of the month. The web page is checked once a month on the given day, and an email message is generated if the file has not been modified for more than a month.
May15   A date. An email message is generated once a year on the given date.
Year   An email message is generated once a year on August 15th (just before the start of the semester).
Beg_Sem   An email message is generated twice each year, on August 15th and again on January 15th, just before the start of each semester.
End_Sem   An email message is generated twice each year, on December 31st and again on May 30th, just after the end of each semester.
file:/path/to/file   If the given file is newer than the web page, or if the given file does not exist, an email message is generated.
file+15   If the web page has not been modified in 15 days, an email message is generated.

An html file may contain more than one meta-maintain tag.

<meta name="Email" content="address, ...">

Normally, when an email message is generated, it is sent to the owner of the file. If the file has no owner, the webmaster is notified.

If a meta-email tag is present, then the reminder is sent to the comma-separated list of email addresses instead.

Testing

The meta-maintain mechanism is implemented by the webmaint command. Webmaint runs early each morning, after the search index has been recompiled.

Web authors can run webmaint themselves, to test their meta-maintain tags. When run by a user, webmaint does not generate any email, and only reports on files owned by the person running the command.

	% webmaint
When run without arguments, webmaint generates the report it would generate for the current date. The -t option tells webmaint to generate a report for a future date.
	% webmaint -t jul04
This command will generate a report for the following July 4th. In this way, you can choose a date when you expect to receive a report, and test webmaint to ensure that you will receive it. For file dependencies, you must change the modified time of the dependency file to force it to be included in a report.

Examples

<meta name="maintain" content="friday">

Send an email message to the web page owner every friday, if it has not been modified since the preceding friday.

<meta name="maintain" content="1">
<meta name="email" content="larry,moe">

Send an email message to larry and moe on the 1st of each month, if the web page has not been modified in the last month.

<meta name="maintain" content="file:/home/curly/webstuff/data">

Send an email message to the web page owner whenever the file /home/curly/webstuff/data is newer than the web page.

<meta name="maintain" content="file+60">
<meta name="maintain" content="beg_sem">

Send an email message to the web page owner whenever the web page has not been modified for more than 60 days, and at the beginning of each semester.