Cron jobs really only offer a few basic benefits: scheduling, execution and logging. These are all things that are pretty easy to replicate in a PHP application...
Step One: Create a table of tasks
You'd need to store:
- Frequency of execution
- What to execute (include file, callback, eval code, etc.)
- Calculate next run date
- Store previous run dates
Step Two: Execution
You have a few options on how to actually trigger the tasks:
- Call a PHP-generated blank GIF image on every page run, which triggers the cron code.
- Call an AJAX script which runs the cron code
- Call it normally inside your application (may slow execution)
No matter how it starts, it would trigger the actual cron code, which decides whether or not there are any tasks to run, and which ones to run.
Step Three: Logging
This one should be pretty simple. Just log what happens during tasks to a file that you can read after to make sure its working.
...
Before running a task, you'd update the previous run date, and after running a task, you'd set the next run date, based on its frequency. The only fallback of this method is that when nobody visits the sites, no cron jobs will execute until the next visitor comes.