Job execution: Every some time

Elephant Drummer Features
Post Reply
User avatar
Klaudiusz
Site Admin
Posts: 29
Joined: Tue Aug 07, 2018 9:55 pm
Contact:

Job execution: Every some time

Post by Klaudiusz » Thu May 09, 2019 1:46 pm

Execute anonymous job every 10 seconds:

Code: Select all

@DrummerJob(every=@Every(second=10))
public void method() {
  System.out.println(new Date()+" job executed");
}
Test:

Code: Select all

*** TEST JOB: Name:Unnamed - com.elephant.drummer.test.job.TestJob2.method FOR DATE: Thu May 09 15:30:08 CEST 2019 and 5 STEPS ***
*** Step:1 for date: Thu May 09 15:30:08 CEST 2019 next execution: Thu May 09 15:30:10 CEST 2019 ***
*** Step:2 for date: Thu May 09 15:30:10 CEST 2019 next execution: Thu May 09 15:30:20 CEST 2019 ***
*** Step:3 for date: Thu May 09 15:30:20 CEST 2019 next execution: Thu May 09 15:30:30 CEST 2019 ***
*** Step:4 for date: Thu May 09 15:30:30 CEST 2019 next execution: Thu May 09 15:30:40 CEST 2019 ***
*** Step:5 for date: Thu May 09 15:30:40 CEST 2019 next execution: Thu May 09 15:30:50 CEST 2019 ***
**************** Name:Unnamed - com.elephant.drummer.test.job.TestJob2.method TEST END **************************** 
Post Reply