1 <?php
2 /**
3 * Abstract task representing scheudled tasks.
4 * You can use the different subclasses {@link HourlyTask}, {@link DailyTask},
5 * {@link WeeklyTask} to determine when a task should be run,
6 * and use automation tools such as unix cron to trigger them.
7 *
8 * Example Cron:
9 * <code>
10 * # Quarter-hourly task (every hour at 25 minutes past) (remove space between first * and /15)
11 * * /15 * * * * www-data /my/webroot/sapphire/cli-script.php /QuarterlyHourlyTask > /var/log/silverstripe_quarterhourlytask.log
12 *
13 * # HourlyTask (every hour at 25 minutes past)
14 * 25 * * * * www-data /my/webroot/sapphire/cli-script.php /HourlyTask > /var/log/silverstripe_hourlytask.log
15 *
16 * # DailyTask (every day at 6:25am)
17 * 25 6 * * * www-data /my/webroot/sapphire/cli-script.php /DailyTask > /var/log/silverstripe_dailytask.log
18 *
19 * # WeelkyTask (every Monday at 6:25am)
20 * 25 6 1 * * www-data /my/webroot/sapphire/cli-script.php /WeeklyTask > /var/log/silverstripe_weeklytask.log
21 * </code>
22 *
23 * @todo Improve documentation
24 * @package sapphire
25 * @subpackage cron
26 */
27 abstract class ScheduledTask extends CliController {
28 // this class exists as a logical extension
29 }