1 2 11 package org.mmbase.applications.crontab; 12 13 import org.mmbase.bridge.*; 14 import org.mmbase.util.logging.*; 15 19 public class SampleCronJob extends AbstractCronJob implements CronJob { 25 26 private static Logger log = Logging.getLoggerInstance(SampleCronJob.class); 27 28 public SampleCronJob() { 29 log.info("The constructor of a cronjob is only called once"); 30 } 31 32 public void run() { 33 log.info("The job has been started by the cronEntry" + cronEntry); 34 log.info("the entry has this configuration " + cronEntry.getConfiguration()); 35 log.info("the entry has this id " + cronEntry.getId()); 36 37 Cloud cloud = ContextProvider.getDefaultCloudContext().getCloud("mmbase", "class", null); log.info("found cloud " + cloud.getUser().getIdentifier() + "/" + cloud.getUser().getRank()); 42 log.info("The job has stopped"); 43 } 45 } 46 | Popular Tags |