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).
**Update: Editted based on new information.**

Meta refresh won't work because cronjob.de will be using an automated system that doesn't actually read the contents of the page. No browser, so nothing to see the meta refresh.

You have a couple options. They vary in greater or lesser horribleness.

The best option is to change webhosts. A good webhost will have full support for cron. But if you need to touch cron, honestly, you should probably be on a VPS host anyways. A lot of hosts will object to a cron task running every minute unless the task is just updating something really quickly and exits. But VPS hosts won't usually care. Slicehost offers VPS servers for as little as $20/month. Not recommended for people who've never had root access before.

The only option you've got that will work with cronjob.de's 5 minute limitation is to build a loop that will run an iteration, sleep, run another iteration, and repeat however many times you need before the end of the 5 minutes. However, there are two major problems with this approach. First, if you have a request that lasts 4 minutes, there's a distinct possibility that your webhost might kill the request before it finishes. Second, if the webserver isn't configured just right, such a request might block other requests, preventing legitimate users from accessing your site — they would queue up, and be waiting for the cronjob.de request to finish before their requests could be completed. And since that request will take 4-5 minutes to finish, before being repeated a minute later, they might only be able to access your site once every 5 minutes. I'm guessing this is undesirable. Unfortunately, the only way to know if you'll run afoul of either of these problems is to ask your webhost. I don't recommend trying it before asking, because they may not appreciate it if it goes unexpectedly bad and starts affecting their other customers on the server.

If you're lucky, they may even be willing to set up a cron job for you.