Package org.apache.sling.event.jobs

Examples of org.apache.sling.event.jobs.ScheduledJobInfo


        try {
            final Date d = new Date();
            d.setTime(System.currentTimeMillis() + 3000); // run in 3 seconds

            // create scheduled job
            final ScheduledJobInfo info = this.getJobManager().createJob(TOPIC).schedule().at(d).add();
            assertNotNull(info);

            while ( counter.get() == 0 ) {
                this.sleep(1000);
            }
            assertEquals(0, this.getJobManager().getScheduledJobs().size()); // job is not scheduled anymore
            info.unschedule();
        } finally {
            ehReg.unregister();
        }
    }
View Full Code Here


        for(final ScheduleInfoImpl info : scheduleInfos) {
            info.check(msgs);
        }
        if ( msgs.size() == 0 ) {
            try {
                final ScheduledJobInfo info = this.jobScheduler.writeJob(topic, jobName, properties, scheduleName, isSuspended, scheduleInfos);
                if ( info != null ) {
                    return info;
                }
                msgs.add("Unable to persist scheduled job.");
            } catch ( final PersistenceException pe) {
View Full Code Here

TOP

Related Classes of org.apache.sling.event.jobs.ScheduledJobInfo

Copyright © 2018 www.massapicom. 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.