Skip to content

Latest commit

 

History

History
 
 

orcid-scheduler-web

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

ORCID-Scheduler-Web

Welcome to the ORCID Scheduler project. Here we configure all task that we will like to run in a scheduled basis.

How does it work?

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.

How to register a new scheduled task?

To register a new scheduled task, you first need to be sure that:

###Prerequisites

  1. The class containing the scheduled task should be at the ORCID's Scheduler project and the method that will run should be public.
  2. There should be a bean associated with that class in the context config file
  3. 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

Getting Support

If you are experience problems using ORCID you can check our help page.

Contributing

Pull requests are welcome; See CONTRIBUTING.md

Development Environment Setup

See DEVSETUP.md

License

See LICENSE.md

Contributors

See CREDITS.md

Projects

See PROJECTS.md