语言代码建议

I am looking for a bit of advice on what sort of language of code to use for a particular thing I am trying to achieve, if anybody can really help.

I may need JQuery or Ajax, but would like confirmation if I am along the right lines.

I have a website that partly uses user sessions & non user sessions. I am hoping to get write something, that on a certain condition, every.. 30 minutes say ( server time ) executes a PHP statement, regardless of it a user session is logged in or not.

Something along the lines of

<?php

IF( $user < 50) {

$result = mysql_query("UPDATE table1 SET column1= column1 + 1 WHERE name='$name'")
or die(mysql_error()); 
} else { } 

?>

That is not exact table / column names as I have yet to build this. Is there a way I am able to get this to happen, every 10/15/30 minutes from server time, regardless of at the time, the user is logged in / out?

I look forward to any advice on language that can do this.