Managed to fix the issues with running an X11 app from cron, by running the
cron job from the user crontab rather than /etc/cron.hourly. I am now
making changes to the code to install and uninstall a user cron job to
enable and disable alerts.

It turns out that this doesn't make much difference when it comes to
scheduling issues (ie. when does the first alert come up) because
cron.hourly jobs are run with Vixie cron at 17 mins past the hour anyway.
Our scripts will hopefully be able to be a bit more sophisticated than
that.