summaryrefslogtreecommitdiffstats
path: root/patchwork/bin/patchwork-cron.py
diff options
context:
space:
mode:
Diffstat (limited to 'patchwork/bin/patchwork-cron.py')
-rwxr-xr-xpatchwork/bin/patchwork-cron.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/patchwork/bin/patchwork-cron.py b/patchwork/bin/patchwork-cron.py
new file mode 100755
index 0000000..148e97c
--- /dev/null
+++ b/patchwork/bin/patchwork-cron.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+import sys
+from patchwork.utils import send_notifications, do_expiry
+
+def main(args):
+ errors = send_notifications()
+ for (recipient, error) in errors:
+ print "Failed sending to %s: %s" % (recipient.email, ex)
+
+ do_expiry()
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
+