Examples of fireJobAt()


Examples of org.apache.cocoon.components.cron.JobScheduler.fireJobAt()

                }
            }

            String role = CronJob.class.getName() + "/usecase";
            String name = getJobName(usecase, userId);
            scheduler.fireJobAt(date, name, role, parameters, objects);

        } catch (Exception e) {
            getLogger().error("Could not create job: ", e);
            throw new RuntimeException(e);
        } finally {
View Full Code Here

Examples of org.apache.cocoon.components.cron.JobScheduler.fireJobAt()

                }
            }

            String role = CronJob.class.getName() + "/usecase";
            String name = getJobName(usecase, userId);
            scheduler.fireJobAt(date, name, role, parameters, objects);

        } catch (Exception e) {
            getLogger().error("Could not create job: ", e);
            throw new RuntimeException(e);
        } finally {
View Full Code Here

Examples of org.apache.cocoon.components.cron.JobScheduler.fireJobAt()

                }
            }

            String role = CronJob.class.getName() + "/usecase";
            String name = getJobName();
            scheduler.fireJobAt(date, name, role, parameters, objects);

        } catch (Exception e) {
            getLogger().error("Could not create job: ", e);
            throw new RuntimeException(e);
        } finally {
View Full Code Here

Examples of org.apache.cocoon.components.cron.JobScheduler.fireJobAt()

                    }
                }
            }

            String role = CronJob.class.getName() + "/usecase";
            scheduler.fireJobAt(date, "foo", role, parameters, objects);

        } catch (Exception e) {
            getLogger().error("Could not create job: ", e);
            throw new RuntimeException(e);
        } finally {
View Full Code Here

Examples of org.apache.cocoon.components.cron.JobScheduler.fireJobAt()

        JobScheduler scheduler = null;
        try {
            scheduler = (JobScheduler) m_serviceManager.lookup(JobScheduler.ROLE);
            Date executionTime = new Date(System.currentTimeMillis() + configuration.getAutoReconnectDelay());
            ReconnectionJob job = new ReconnectionJob(this, configuration);
            scheduler.fireJobAt(executionTime, "reconnect_" + configuration.getName(), job);
        }
        catch (ServiceException e) {
            if (getLogger().isWarnEnabled()) {
                getLogger().warn("Cannot obtain scheduler.",e);
            }
View Full Code Here

Examples of org.apache.cocoon.components.cron.JobScheduler.fireJobAt()

        JobScheduler scheduler = null;
        try {
            scheduler = (JobScheduler) m_serviceManager.lookup(JobScheduler.ROLE);
            Date executionTime = new Date(System.currentTimeMillis() + configuration.getAutoReconnectDelay());
            ReconnectionJob job = new ReconnectionJob(this, configuration);
            scheduler.fireJobAt(executionTime, "reconnect_" + configuration.getName(), job);
        }
        catch (ServiceException e) {
            if (getLogger().isWarnEnabled()) {
                getLogger().warn("Cannot obtain scheduler.",e);
            }
View Full Code Here

Examples of org.apache.sling.commons.scheduler.Scheduler.fireJobAt()

        return false;
      }
      logger.debug("runAfter: trying with scheduler.fireJob");
      final Date date = new Date(System.currentTimeMillis() + seconds * 1000);
    try {
        theScheduler.fireJobAt(null, runnable, null, date);
      return true;
    } catch (Exception e) {
      logger.info("runAfter: could not schedule a job: "+e);
      return false;
    }
View Full Code Here

Examples of org.apache.sling.commons.scheduler.Scheduler.fireJobAt()

                } else {
                    // then it must be date
                    if ( this.logger.isDebugEnabled() ) {
                        this.logger.debug("Adding timed event " + config.get(JOB_TOPIC) + "(" + scheduleInfo.jobId + ")" + " with date " + scheduleInfo.date);
                    }
                    localScheduler.fireJobAt(scheduleInfo.jobId, this, config, scheduleInfo.date);
                }
                return true;
            } catch (Exception e) {
                this.ignoreException(e);
            }
View Full Code Here

Examples of org.apache.sling.commons.scheduler.Scheduler.fireJobAt()

                } else {
                    // then it must be date
                    if ( this.logger.isDebugEnabled() ) {
                        this.logger.debug("Adding timed event " + config.get(JOB_TOPIC) + "(" + scheduleInfo.jobId + ")" + " with date " + scheduleInfo.date);
                    }
                    localScheduler.fireJobAt(scheduleInfo.jobId, this, config, scheduleInfo.date);
                }
                return true;
            } catch (Exception e) {
                this.ignoreException(e);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.