Esempio n. 1
0
 public static void jobstatus(final String name) {
   if (StringUtils.isNotBlank(name)) {
     AbstractJob abstractJob = AbstractJob.find("byName", name).first();
     abstractJob.setActive(!abstractJob.isActive());
     abstractJob._save();
   }
   jobs();
 }
Esempio n. 2
0
 @Transactional(readOnly = true)
 public static void runjob(final String name) {
   if (StringUtils.isNotBlank(name)) {
     final List<Job> jobs = JobsPlugin.scheduledJobs;
     for (final Job job : jobs) {
       if (name.equalsIgnoreCase(job.getClass().getSimpleName())) {
         job.now();
       }
     }
   }
   jobs();
 }