Question: I have a file "`update.php`" which does some MySQL operations. A cron job executes this file every 5 minutes. Unfortunately, I cannot execute the cron job more often.

So I had the idea that I could add ...

```
<html>
<head>
  <meta http-equiv="refresh"  content="2; URL=<?php echo $_SERVER['SCRIPT_NAME']; ?>" />
</head>
<body></body>
</html>

```

... to the page "`update.php`". Will cron execute the file in a way that the page will refresh automatically? Or will that not happen because there is no client with a browser?

If it the meta refresh has no effect, is there any other possibility to achieve the refreshing of the page?

Thanks in advance!

Answer: 
I'd say don't try to do this with php, change your crontab. If you need your application to do a cronjob every minute and your hosting doesn't provide this option, you have most likely outgrown your hosting. Get yourself a VPS hosting for 20$ a month (Slicehost, Servergrove).
You can use PHP to call the script...

```
<?php
$script='/path/to/my/php/script.php';

ignore_user_abort(1);
set_time_limit(0);
$php=exec('which php');
while (1) {
    if (file_exists($script)) { exec($php.' '.$script); }
    else { file_get_contents($script); }
    sleep(2);
}
?>

```

The file you give $script needs to exist, otherwise it thinks it's a URL.

It should do the trick.