forked from geodmms/xdgnjobs

?? ?
2008-03-14 691f856cfa1dd70b0ad7dbbd9f4e32914b9bc157
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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);
        }
    }
 
}