1

I'm testing quartz plugin with Grails 2.5.1. Below is the Job code:

class TestingJob {
    static triggers = {
      simple name: 'mySimpleTrigger', startDelay: 60000, repeatInterval: 1000l, repeatCount: 10
    }

    def execute() {
      println (" Hi ")
    }
}

As per my understanding from the documentation , Hi is supposed to be printed 11 times, but actually, it's only printed 2 times. Am I missing something?

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
Sherif
  • 421
  • 3
  • 15
  • 1
    Try using `println (new Date())` and see what happens. You'll likely find that since the console output was duplicated beyond the second output that the console quietly filtered it out. – Joshua Moore Dec 27 '15 at 23:40
  • `test.TestingJob Hi Tue Dec 29 01:19:22 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:23 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:24 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:25 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:26 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:27 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:28 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:29 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:30 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:31 EET 2015 test.TestingJob Hi Tue Dec 29 01:19:32 EET 2015` this was the output, now it's working fine ! – Sherif Dec 28 '15 at 23:20

1 Answers1

0

Try using println (new Date()) and see what happens.

You'll see that since the console output was duplicated beyond the second output that the console quietly filtered it out.

The job is actually running as expected.

Joshua Moore
  • 24,706
  • 6
  • 50
  • 73