Writing Scheduled Tasks

A scheduled task in OpenMRS runs every so often and does tasks in the background.

Every task is run on a new thread.

Your class should extend AbstractTask

Examples

https://github.com/openmrs/openmrs-core/tree/master/api/src/main/java/org/openmrs/scheduler/tasks

 

Authentication

As of 1.7.0 tasks are executed as the Daemon User. This gives them all privileges without having to use Context.addProxyPrivilege().

See Also

Administering Scheduled Tasks