tinyspeck/hammock — pull request #26 by ktbartholomew (2014-04-09 20:13:10+00:00)
Title: Adding cron.php to manage plugin instances that should run on a schedule

When cron.php is fetched, a block of cron jobs is added to the Apache user's crontab. Each cron job fetches the hook URL of instances that specify they should use cron. To specify that an instance should use cron, simply define the following instance config variables:
```php
$this->icfg['cron'] = true;
$this->icfg['cron_interval'] = '*/5 * * * *'; // run every 5 minutes
```

One should also set cron.php itself to be fetched on a schedule, so that new cron-ready instances are added to the crontab soon after they are added in Hammock.

```
# Update Hammock Cron every 5 minutes
*/5 * * * * /usr/bin/curl "http://example.com/hammock/cron.php"
```