From 6b0c9c48e8b59c2c8e021fa342d7ba16c4f4bf77 Mon Sep 17 00:00:00 2001 From: Ross Poulton Date: Sun, 20 Jan 2013 14:40:57 +1100 Subject: [PATCH] Closes #161 - provide script to simplify automation of email polling --- helpdesk/poll_helpdesk_email_queues.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 helpdesk/poll_helpdesk_email_queues.sh diff --git a/helpdesk/poll_helpdesk_email_queues.sh b/helpdesk/poll_helpdesk_email_queues.sh new file mode 100644 index 00000000..65e7d1b8 --- /dev/null +++ b/helpdesk/poll_helpdesk_email_queues.sh @@ -0,0 +1,18 @@ +#!/bin/bash + + +# don't forget to add this script to the /etc/crontab: +# +# */1 * * * * username /home/username/django/project/poll_helpdesk_email_queues.sh >> /tmp/foo.log 2>&1 + +# set your django and project paths here +PATHTODJANGO="/home/username/django/libraries/lib/python" +PATHTOPROJECT="/home/username/django/project/" + + +export PYTHONPATH=$PYTHONPATH:$PATHTODJANGO:$PATHTOPROJECT: + +cd $PATHTOPROJECT +/usr/bin/python manage.py get_email + +