Package org.qi4j.library.scheduler.schedule.cron

Examples of org.qi4j.library.scheduler.schedule.cron.CronSchedule


        }

        private CronSchedule newTransientCronSchedule( Task task, String cronExpression, DateTime start )
        {
            ValueBuilder<CronSchedule> builder = module.newValueBuilder( CronSchedule.class );
            CronSchedule prototype = builder.prototype();
            prototype.task().set( task );
            prototype.start().set( start );
            prototype.cronExpression().set( cronExpression );
            CronSchedule schedule = builder.newInstance();
            logger.info( "Schedule {} created: {}", schedule.presentationString(), schedule.identity().get() );
            return schedule;
        }
View Full Code Here


        private CronSchedule newPersistentCronSchedule( Task task, String cronExpression, DateTime start )
        {
            UnitOfWork uow = module.currentUnitOfWork();
            EntityBuilder<CronSchedule> builder = uow.newEntityBuilder( CronSchedule.class );
            CronSchedule builderInstance = builder.instance();
            builderInstance.task().set( task );
            builderInstance.start().set( start );
            builderInstance.cronExpression().set( cronExpression );
            CronSchedule schedule = builder.newInstance();
            logger.info( "Schedule {} created: {}", schedule.presentationString(), schedule.identity().get() );
            return schedule;
        }
View Full Code Here

TOP

Related Classes of org.qi4j.library.scheduler.schedule.cron.CronSchedule

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.