Skip to content

dirigiblelabs/sample-java-job-decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sample-java-job-decorator

Showing how to use @Scheduled to register a Quartz job in Eclipse Dirigible.

Layout

sample-java-job-decorator/   # Dirigible project (registry path)
└── demo/
    └── scheduled/
        └── CleanupJob.java  # @Scheduled — fires every second, logs "CleanupJob executed!"

Usage

Drop this project into the Dirigible IDE (clone via the Git perspective and publish, or copy it to /registry/public/sample-java-job-decorator/). The synchronizer compiles CleanupJob.java, registers the Quartz job, and it starts firing on the declared cron expression immediately.

Job styles

Two ways to write a Java job — pick one per @Component class (never both), like Spring:

  • Strong interfaceCleanupJob is a @Component that implements JobHandler and supplies its own cron() (like org.quartz.Job); no @Scheduled annotation.
  • Method-level annotationMaintenance is a @Component with @Scheduled-annotated methods (Spring @Scheduled-on-a-method style).

See the Develop guide and the Java SDK.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages