Your cron entry is generally right. That way it will run the command hourly five minutes before the full hour.
If it doesnt work nonetheless, your user is either not allowed to run cron jobs or the command cannot be executed. It is better to use absolute paths like /path/to/the/php/directory/php -q /path/to/script.php