package com.ximple.eofms;
|
|
import java.util.Date;
|
|
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.LogFactory;
|
import org.quartz.Scheduler;
|
import org.quartz.SchedulerException;
|
import org.quartz.impl.StdSchedulerFactory;
|
|
/**
|
* Hello world!
|
*/
|
public class XQuartzJobCarrier
|
{
|
static Log logger = LogFactory.getLog(XQuartzJobCarrier.class);
|
|
|
public static void main(String[] args)
|
{
|
XQuartzJobCarrier instance = new XQuartzJobCarrier();
|
instance.startScheduler();
|
}
|
|
public void startScheduler()
|
{
|
Scheduler scheduler = null;
|
|
try
|
{
|
// Get a Scheduler instance from the Factory
|
scheduler = StdSchedulerFactory.getDefaultScheduler();
|
|
// Start the scheduler
|
scheduler.start();
|
logger.info("Scheduler started at " + new Date());
|
|
} catch (SchedulerException ex)
|
{
|
// deal with any exceptions
|
logger.error(ex);
|
}
|
}
|
|
}
|