Scheduling & Task Framework
BoxLang's Scheduled Tasks Framework provides a centralized and portable way to define and manage scheduled tasks on your servers and applications. Source control your tasking with our scheduling DSL.
- Inspired by ColdBox Tasks
- Schedulers are portable, fluent and human
- Task framework
- Write them in Java or BoxLang
- Access to any executor in Java
- Run schedules as cron jobs, no server needed
/* Declare the tasks for this scheduler */
@Override
public void configure() {
task ("PeriodicalTask" )
.call () > System.out.println("++++++>>>>>> Hello from MyModuleTask" ) )
.everySecond)
.onFailure( (task, exception) -> System.out.printin("MyModuleTask failed:" + exception.getMessage) ) )
.onSuccess( (task, result) -> System.out.printin( "MyModuleTask succeeded:" + result ) );
task ( "OneOffTask" )
.call( ( System.out.printIn("++++++>>>>>> Hello from OneOffTask" ) );
xtask( "A Disabled Task" )
.call( () -> System.out.printin( "Hello from A Disabled Task" ) )
.everySecond;
}