com.atlassian.sal.api.scheduling
Interface PluginScheduler


public interface PluginScheduler

Interface for scheduling jobs

Since:
2.0

Method Summary
 void scheduleJob(java.lang.String name, java.lang.Class<? extends PluginJob> job, java.util.Map<java.lang.String,java.lang.Object> jobDataMap, java.util.Date startTime, long repeatInterval)
          Schedule the given job.
 void unscheduleJob(java.lang.String string)
          Unschedule the given job
 

Method Detail

scheduleJob

void scheduleJob(java.lang.String name,
                 java.lang.Class<? extends PluginJob> job,
                 java.util.Map<java.lang.String,java.lang.Object> jobDataMap,
                 java.util.Date startTime,
                 long repeatInterval)
Schedule the given job.

WARNING: it is very important not to try to call this method until the underlying application is fully started. You should implement LifecycleAware and call scheduleJob() only on LifecycleAware.onStart()

Parameters:
name - A unique name of the job
job - The class for the job
jobDataMap - Any data that needs to be passed to the job. This map instance will always be the same instance that is given to the job when it executes.
startTime - The time the job is to start.
repeatInterval - How long the interval between repeats, in milliseconds. Note, some implementations

unscheduleJob

void unscheduleJob(java.lang.String string)
Unschedule the given job

Parameters:
string - The job name to unschedule


Copyright © 2009 Atlassian. All Rights Reserved.