How to create a new Job - openMF/Deprecated-mifosx GitHub Wiki
-
Add NEW_JOB to JobName enum
-
Create a void doSomething() throws JobExecutionException method annotated with @CronTarget(jobName = JobName.NEW_JOB) in a @Service. (Normally you not need to manually register your new @Service in a Spring XML due to component-scan; if in doubt, double check packages in appContext.xml.)
-
Create a new Liquibase DB migration script include something like:
INSERT INTO job (name, display_name, cron_expression, create_time, task_priorit) VALUES ('NEW_JOB', 'This does my thing', '0 0 0 1/1 * ? *', now(), 5);
- TODO how to write a test