Welcome to the ORCID Scheduler project. Here we configure all task that we will like to run in a scheduled basis.
There are some tasks at the ORCID's Scheduler project to run in a scheduled basis, so, they are registered in the list of scheduled tasks in the scheduler config file, those tasks can be of two different types:
- fixed-delay: An interval-based trigger where the interval is measured from the completion time of the previous task. The time unit value is measured in milliseconds.
- cron: A cron-based trigger. See the CronSequenceGenerator JavaDoc for example patterns.
When a task is registered here, the scheduler engine will process it and run it following the rule specified for that task.
To register a new scheduled task, you first need to be sure that:
###Prerequisites
- The class containing the scheduled task should be at the ORCID's Scheduler project and the method that will run should be public.
- There should be a bean associated with that class in the context config file
- There should be a couple of unit tests in the tests directory that ensures you cron job runs as expected.
Then, when you are sure that your class is ready and that none of the unit tests got broken, you can register your scheduled task like this:
###Registering the task
Add your task to the orcid-scheduler-context.xml file, as the last element of the task:scheduled-tasks element and looking like this:
<task:scheduled ref="bean_name" method="method_name" type="cron_or_time_in_millis"/>
Where:
- bean_name: the bean name defined in context config file
- method_name: the method that will be triged by the scheduler
- type:
- cron: A cron-based trigger. See the CronSequenceGenerator JavaDoc for example patterns.
- fixed-delay: An interval-based trigger where the interval is measured from the completion time of the previous task. The time unit value is measured in milliseconds.
- cron_or_time_in_millis: A cron expression or a number of milliseconds based on the type you selected
If you are experience problems using ORCID you can check our help page.
Pull requests are welcome; See CONTRIBUTING.md
See DEVSETUP.md
See LICENSE.md
See CREDITS.md
See PROJECTS.md