<div dir="ltr">thank you - big help!<br><br>Em<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 January 2015 at 22:15, Justin Mitchell <span dir="ltr"><<a href="mailto:justin@discordia.org.uk" target="_blank">justin@discordia.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 2015-01-23 at 21:54 +0000, Emyr Morris wrote:<br>
> yessss.... ajax - I was hoping to avoid ajax<br>
><br>
</span><script<br>
src="<a href="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" target="_blank">https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js</a>"></script><br>
<br>
<script type="text/javascript"><br>
<br>
function keepalive()<br>
{<br>
        $.get("<a href="http://localhost/cgi-bin/keepalive.cgi" target="_blank">http://localhost/cgi-bin/keepalive.cgi</a>");<br>
}<br>
<br>
// when document finishes loading,<br>
// set a timer to call keepalive every 30 seconds<br>
$(document).ready(function(){<br>
        window.setInterval(keepalive, 30000);<br>
});<br>
<br>
</script><br>
<br>
<br>
the keepalive.cgi can just be a simple as 'touch /tmp/keepalive.log'<br>
<br>
then a cron job can test the timestamp and act accordingly<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Hackspace mailing list<br>
<a href="mailto:Hackspace@swansea.hackspace.org.uk">Hackspace@swansea.hackspace.org.uk</a><br>
<a href="http://swansea.hackspace.org.uk/mailman/listinfo/hackspace" target="_blank">http://swansea.hackspace.org.uk/mailman/listinfo/hackspace</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.<br> <br>Mae'r e-bost hwn ac unrhyw ffeiliau a drosglwyddir gydag ef yn gyfrinachol ac at ddefnydd yr unigolyn neu'r corff y cyfeiriwyd hwy atynt yn unig.</div></div></div>
</div>