From 88867cdd2335ec88bea42a0601e052a45e67fa7c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 18 Feb 2013 14:01:15 +0100 Subject: [PATCH] API Deprecated ScheduledTask and subclasses Base CliController or BuildTask instead, with custom cron job intervals. --- docs/en/changelogs/3.1.0.md | 5 ++++- tasks/DailyTask.php | 2 ++ tasks/HourlyTask.php | 2 ++ tasks/MonthlyTask.php | 2 ++ tasks/QuarterHourlyTask.php | 2 ++ tasks/ScheduledTask.php | 13 +++++++++++++ tasks/WeeklyTask.php | 2 ++ tasks/YearlyTask.php | 2 ++ 8 files changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/en/changelogs/3.1.0.md b/docs/en/changelogs/3.1.0.md index dcc3c3240..ae59a70f0 100644 --- a/docs/en/changelogs/3.1.0.md +++ b/docs/en/changelogs/3.1.0.md @@ -218,4 +218,7 @@ through the CMS controllers, providing a simple level of security. - `DataList#find` - `DataList#byIDs` - `DataList#reverse` - * `DataList#dataQuery` has been changed to return a clone of the query, and so can't be used to modify the list's query directly. Use `DataList#alterDataQuery` instead to modify dataQuery in a safe manner. \ No newline at end of file + * `DataList#dataQuery` has been changed to return a clone of the query, and so can't be used to modify the list's query directly. Use `DataList#alterDataQuery` instead to modify dataQuery in a safe manner. + * `ScheduledTask`, `QuarterHourlyTask`, `HourlyTask`, `DailyTask`, `MonthlyTask`, `WeeklyTask` and + `YearlyTask` are deprecated, please extend from `BuildTask` or `CliController`, + and invoke them in self-defined frequencies through Unix cronjobs etc. \ No newline at end of file diff --git a/tasks/DailyTask.php b/tasks/DailyTask.php index 393aadbe5..a4a966544 100644 --- a/tasks/DailyTask.php +++ b/tasks/DailyTask.php @@ -5,6 +5,8 @@ * Please note: Subclasses of this task aren't extecuted automatically, * they need to be triggered by an external automation tool like unix cron. * See {@link ScheduledTask} for details. + * + * @deprecated 3.1 * * @todo Improve documentation * @package framework diff --git a/tasks/HourlyTask.php b/tasks/HourlyTask.php index ed3c23910..19babb50f 100644 --- a/tasks/HourlyTask.php +++ b/tasks/HourlyTask.php @@ -5,6 +5,8 @@ * Please note: Subclasses of this task aren't extecuted automatically, * they need to be triggered by an external automation tool like unix cron. * See {@link ScheduledTask} for details. + * + * @deprecated 3.1 * * @package framework * @subpackage cron diff --git a/tasks/MonthlyTask.php b/tasks/MonthlyTask.php index d319e776b..f47384aea 100644 --- a/tasks/MonthlyTask.php +++ b/tasks/MonthlyTask.php @@ -5,6 +5,8 @@ * Please note: Subclasses of this task aren't extecuted automatically, * they need to be triggered by an external automation tool like unix cron. * See {@link ScheduledTask} for details. + * + * @deprecated 3.1 * * @package framework * @subpackage cron diff --git a/tasks/QuarterHourlyTask.php b/tasks/QuarterHourlyTask.php index 543898978..25fc08567 100644 --- a/tasks/QuarterHourlyTask.php +++ b/tasks/QuarterHourlyTask.php @@ -5,6 +5,8 @@ * Please note: Subclasses of this task aren't extecuted automatically, * they need to be triggered by an external automation tool like unix cron. * See {@link ScheduledTask} for details. + * + * @deprecated 3.1 * * @package framework * @subpackage cron diff --git a/tasks/ScheduledTask.php b/tasks/ScheduledTask.php index f4f1af8b1..799494c5a 100644 --- a/tasks/ScheduledTask.php +++ b/tasks/ScheduledTask.php @@ -50,6 +50,8 @@ * # WeelkyTask (every Monday at 6:25am) * 25 6 1 * * www-data /webroot/framework/cli-script.php /WeeklyTask > /var/log/weeklytask.log * + * + * @deprecated 3.1 * * @todo Improve documentation * @package framework @@ -57,4 +59,15 @@ */ abstract class ScheduledTask extends CliController { // this class exists as a logical extension + + public function init() { + Deprecation::notice( + '3.1', + 'ScheduledTask, QuarterHourlyTask, HourlyTask, DailyTask, MonthlyTask, WeeklyTask and ' . + 'YearlyTask are deprecated, please extend from BuildTask or CliController, ' . + 'and invoke them in self-defined frequencies through Unix cronjobs etc.' + ); + + parent::init(); + } } diff --git a/tasks/WeeklyTask.php b/tasks/WeeklyTask.php index 2d99d2ac2..08ff4d10a 100644 --- a/tasks/WeeklyTask.php +++ b/tasks/WeeklyTask.php @@ -5,6 +5,8 @@ * Please note: Subclasses of this task aren't extecuted automatically, * they need to be triggered by an external automation tool like unix cron. * See {@link ScheduledTask} for details. + * + * @deprecated 3.1 * * @package framework * @subpackage cron diff --git a/tasks/YearlyTask.php b/tasks/YearlyTask.php index 392de1a5f..bc62739d2 100644 --- a/tasks/YearlyTask.php +++ b/tasks/YearlyTask.php @@ -5,6 +5,8 @@ * Please note: Subclasses of this task aren't extecuted automatically, * they need to be triggered by an external automation tool like unix cron. * See {@link ScheduledTask} for details. + * + * @deprecated 3.1 * * @package framework * @subpackage cron