Easiest way I do it:
Place security on the PHP script so only localhost (127.0.0.1) can use it. Place the script on your website some place, with no links to it.
Create a cron.daily file:
pico -w mysql.alter
#!/bin/bash
/usr/bin/lynx --dump "http://www.mydomain.com/url-to-php/altermysql.php" > /dev/null
[SAVE CHANGES]
chmod 755 mysql.alter
That's the easier way to do it, because PHP is installed as a module you won't be able to execute command-line PHP functions, however, you can always use lynx to access the URL on the webserver and thus trigger the PHP code. As long as you create security inside your PHP code you can avoid security issues.
IE:
if ($password != "l3tm31n")
exit;
Then you would supply the following URL when using LYNX:
/usr/bin/lynx --dump "http://www.mydomain.com/url-to-php/altermysql.php?password=l3tm31n"
Hope this helped,
Nathan