Create a job scheduler which runs every 15 minutes

Hi, I need to create a scheduler which runs every 15 minutes. Is it possible using flowable ?
I’m not familiar with flowable. Can someone help me how to do this ?


I will try to help you with a sample from a project, but as I’m busy, I will simple share the code and I hope it will make sense for you.

The job class:


public class MiEndTasksCleanupJobHandler {

Boolean dryRun;

@Scheduled(cron = “${MiEndTasksCleanupJobHandler.cronexpresion}”)
public void execute() {
HistoryService hs = ProcessEngines.getDefaultProcessEngine().getHistoryService();
List tasks = hs.createHistoricTaskInstanceQuery().taskDeleteReason(“MI_END”).list();

  for (HistoricTaskInstance task : tasks) {
  	String taskDescription = task.getDescription();
  	if (dryRun != null && !dryRun) {


For the configuration, I have the following properties in the file:

MiEndTasksCleanupJobHandler.cronexpresion=0 0/5 8-19 * * MON-FRI

And of course, I have spring configured to read my project’s classes by using the spring.factories file with the following content:

And the configuration class is:


@ComponentScan(basePackageClasses = MyCustomEngineConfiguration.class)
public class MyCustomEngineConfiguration {
// not usefull code for this answer got removed

Thank You for spending your valuable time and sharing sample code. I will try out this.

@douglascrp How do I get the current running instance in the job handler ?

Note that the code shared by @douglascrp uses Spring to schedule logic to be repeated, not a Flowable Job handler. It will indeed periodically execute the logic. Just making sure everyone is on the same page here :-).

Can you elaborate what you’re trying to achieve? What ‘instance’ do you want?

1 Like