Fix for issue #4572. The duplicated recurring tasks were due to milliseconds date differences between iterations.
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.backends.task; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | calendar.setFirstDayOfWeek(GregorianCalendar.SUNDAY); |
| | | calendar.add(GregorianCalendar.MINUTE, 1); |
| | | calendar.set(GregorianCalendar.SECOND, 0); |
| | | calendar.set(GregorianCalendar.MILLISECOND, 0); |
| | | calendar.setLenient(false); |
| | | |
| | | // Weekday |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.backends.task; |
| | | |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | // This task might have been already scheduled from before |
| | | // and thus got initialized from backing file, otherwise |
| | | // log error and continue. |
| | | if (de.getResultCode() != ResultCode.ENTRY_ALREADY_EXISTS) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |