2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
2008-02-25 03:10:37 +01:00
|
|
|
/**
|
2008-12-01 02:15:27 +01:00
|
|
|
* Abstract task representing scheudled tasks.
|
|
|
|
* You can use the different subclasses {@link HourlyTask}, {@link DailyTask},
|
|
|
|
* {@link WeeklyTask} to determine when a task should be run,
|
|
|
|
* and use automation tools such as unix cron to trigger them.
|
|
|
|
*
|
|
|
|
* Example Cron:
|
|
|
|
* <code>
|
2009-08-18 00:30:27 +02:00
|
|
|
* # Quarter-hourly task (every hour at 25 minutes past) (remove space between first * and /15)
|
|
|
|
* * /15 * * * * www-data /my/webroot/sapphire/cli-script.php /QuarterlyHourlyTask > /var/log/silverstripe_quarterhourlytask.log
|
|
|
|
*
|
2008-12-01 02:15:27 +01:00
|
|
|
* # HourlyTask (every hour at 25 minutes past)
|
2009-08-18 00:30:27 +02:00
|
|
|
* 25 * * * * www-data /my/webroot/sapphire/cli-script.php /HourlyTask > /var/log/silverstripe_hourlytask.log
|
2008-12-01 02:15:27 +01:00
|
|
|
*
|
|
|
|
* # DailyTask (every day at 6:25am)
|
|
|
|
* 25 6 * * * www-data /my/webroot/sapphire/cli-script.php /DailyTask > /var/log/silverstripe_dailytask.log
|
|
|
|
*
|
|
|
|
* # WeelkyTask (every Monday at 6:25am)
|
|
|
|
* 25 6 1 * * www-data /my/webroot/sapphire/cli-script.php /WeeklyTask > /var/log/silverstripe_weeklytask.log
|
|
|
|
* </code>
|
|
|
|
*
|
2008-03-03 00:24:10 +01:00
|
|
|
* @todo Improve documentation
|
2008-02-25 03:10:37 +01:00
|
|
|
* @package sapphire
|
|
|
|
* @subpackage cron
|
|
|
|
*/
|
2007-07-19 12:40:28 +02:00
|
|
|
abstract class ScheduledTask extends CliController {
|
2010-02-24 00:35:58 +01:00
|
|
|
// this class exists as a logical extension
|
|
|
|
}
|