KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > applications > crontab > CronJob


1 /*
2  This software is OSI Certified Open Source Software.
3 OSI Certified is a certification mark of the Open Source Initiative.
4
5 The license (Mozilla version 1.0) can be read at the MMBase site.
6 See http://www.MMBase.org/license
7  */

8 package org.mmbase.applications.crontab;
9
10 /**
11  * CronJobs are simply 'Runnable' but also have a init-method, which is called by CronDaemon. It
12  * is wrapped a CronEntry first.
13  *
14  * @author Kees Jongenburger
15  * @author Michiel Meeuwissen
16  * @version $Id: CronJob.java,v 1.2 2006/01/20 08:19:10 michiel Exp $
17  */

18
19
20 public interface CronJob extends Runnable JavaDoc {
21
22     /**
23      * If the CronJobs needs some initializing before the first run, then that can be put in this.
24      */

25     void init(CronEntry cronEntry);
26
27     /**
28      * If after the last run of the job, there need to be shutdown things, then that can be done here.
29      */

30     void stop();
31
32     /**
33      * {@inheritDoc}
34      * This is the method which is repeatedly called.
35      */

36     void run();
37
38
39 }
40
Popular Tags