Showing how to use @Scheduled to register a Quartz job in
Eclipse Dirigible.
sample-java-job-decorator/ # Dirigible project (registry path)
└── demo/
└── scheduled/
└── CleanupJob.java # @Scheduled — fires every second, logs "CleanupJob executed!"
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.
Two ways to write a Java job — pick one per @Component class (never both), like Spring:
- Strong interface —
CleanupJobis a@Componentthat implementsJobHandlerand supplies its owncron()(likeorg.quartz.Job); no@Scheduledannotation. - Method-level annotation —
Maintenanceis a@Componentwith@Scheduled-annotated methods (Spring@Scheduled-on-a-method style).
See the Develop guide and the Java SDK.