Forum Moderators: coopster
[en.wikipedia.org...]
You can run the tasks in the webserver via cron too. Sometimes this makes sense if you've got a complicated auto_prepend_file setup or shared memory stuff going on.
I do this by using wget in my crontab:
*/30 * * * * wget http://localhost/cron/someJob.php >/dev/null 2>&1
Then, when the script runs, it tests to see how long it was since the last time it ran. If it has been long enough, go ahead and run again. If not, just don't do anything.
This is the "poor man's cron job" and is very popular for people who don't have access to the cron tab.
If you can't guarantee that you'll get enough traffic to fulfill the scheduling needs, you can set up a very simple meta tag in a php file that runs every 5 minutes, or however often you want it to run.
You can do that by doing this:
In example.php:
<html>
<head>
<title>Poor Man's Cron</title>
<meta name="refresh" content="5; [example.com...]
</head>
<?php
//do your cronjob processing here
?>
<body>Cron job done!</body>
</html>
That'll refresh every 5 seconds to that URL. 5 minutes would be 300, etc.
So just save example.php on your server, open it in your browser, and then minimize it. As long as that browser is open it'll refresh on schedule.
I always just use Cpanel but you can do it through SSH also.
Lookup a program called "Putty". Note you won't be able to use it if your host has shell access disabled.
I would contact your host and ask if they make the cron tab available, and if not, if they would be able to install it.
Most hosts won't let you use the shell because it's a security risk.