25 lines
712 B
Python
Executable file
25 lines
712 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
import datetime, os, sys
|
|
|
|
# boilerplate
|
|
basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
|
|
sys.path = [ basedir ] + sys.path
|
|
os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
|
|
|
|
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
|
|
if os.path.exists(virtualenv_activation):
|
|
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
|
|
|
|
import django
|
|
django.setup()
|
|
|
|
from ietf.doc.expire import get_soon_to_expire_drafts, send_expire_warning_for_draft
|
|
|
|
|
|
# notify about documents that expire within the next 2 weeks
|
|
notify_days = 14
|
|
|
|
for doc in get_soon_to_expire_drafts(notify_days):
|
|
send_expire_warning_for_draft(doc)
|