diff --git a/README.md b/README.md index 416f42b..589bf68 100644 --- a/README.md +++ b/README.md @@ -578,10 +578,9 @@ task can be used to purge expired session data on a regular basis. The date of expiry can be customised, and is given a default of 7 days to delete sessions after their creation. -You can run the task from the URL, by using http://mysite.com/MultiFormPurgeTask/run +You can run the task from the URL, by using http://mysite.com/dev/tasks/MultiFormPurgeTask?flush=1 -MultiFormPurgeTask is a subclass of *DailyTask*, so can be used alongside the -cli-script.php automated tasks which are included with SilverStripe. +MultiFormPurgeTask is a subclass of *BuildTask*, so can be , so can be run using the [SilverStripe CLI tools](http://doc.silverstripe.org/framework/en/topics/commandline). One way of automatically running this on a UNIX based machine is by cron. diff --git a/code/tasks/MultiFormPurgeTask.php b/code/tasks/MultiFormPurgeTask.php index e9de36f..4d223f0 100644 --- a/code/tasks/MultiFormPurgeTask.php +++ b/code/tasks/MultiFormPurgeTask.php @@ -12,7 +12,7 @@ * * @package multiform */ -class MultiFormPurgeTask extends DailyTask { +class MultiFormPurgeTask extends BuildTask { /** * Days after which sessions expire and @@ -29,7 +29,7 @@ class MultiFormPurgeTask extends DailyTask { * are older than the days specified in $session_expiry_days * and delete them. */ - public function process() { + public function run($request) { $sessions = $this->getExpiredSessions(); $delCount = 0; if($sessions) foreach($sessions as $session) {