From f5375254f90053bd9b688d36f758aca309ec3735 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 26 Jul 2016 17:39:51 -0400 Subject: Adding migration support to LDAP from other account types (#3655) --- model/job.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'model/job.go') diff --git a/model/job.go b/model/job.go index b6c68dce4..229d5efd3 100644 --- a/model/job.go +++ b/model/job.go @@ -84,6 +84,12 @@ func (task *ScheduledTask) Cancel() { removeTaskByName(task.Name) } +// Executes the task immediatly. A recurring task will be run regularally after interval. +func (task *ScheduledTask) Execute() { + task.function() + task.timer.Reset(task.Interval) +} + func (task *ScheduledTask) String() string { return fmt.Sprintf( "%s\nInterval: %s\nRecurring: %t\n", -- cgit v1.2.3-1-g7c22